Re: [Nbd] About error management
- To: Wouter Verhelst <w@...112...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] About error management
- From: Tuomas Jorma Juhani Räsänen <tuomasjjrasanen@...1261...>
- Date: Sat, 29 Dec 2012 22:41:36 +0200
- Message-id: <20121229204136.GB21127@...1259...>
- In-reply-to: <20121229114112.GJ30316@...3...>
- References: <20121228143451.GA25919@...1259...> <20121229114112.GJ30316@...3...>
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: