[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] About error management



On Sat, Dec 29, 2012 at 12:41:12PM +0100, Wouter Verhelst wrote:
> You really know how to dig up the worst warts in nbd, don't you? ;-)
> 

Refactoring is my obsession ;-).

> On Fri, Dec 28, 2012 at 04:34:51PM +0200, Tuomas Jorma Juhani Räsänen wrote:
> 
> > My suggestion is that because we are already depending on libglib and
> > using it's error reporting framework in few places, we should try to
> > use the same mechanism everywhere. In other words, we should pass
> > GError** to functions requiring an error reporting mechanism and then
> > make the error handling decisions in the caller.
> > 
> > Thoughts?
> 
> I've been planning on generalising error handling in precisely that way;
> in fact, there is already one place where I do use a GError** parameter.
> It just isn't being done consistently yet, because it would be a massive
> undertaking to refactor the code in that way.
> 

Well, it's not the smallest possible task, but it could and should be
done. And it can be done in steps.

> If you were to do that, I'd owe you a beer. Seriously.

Let's see how much I like beer...

-- 
Tuomas



Reply to: