Re: [Vala] Wrapping Errors
- From: Jan Hudec <bulb ucw cz>
- To: Yu Feng <rainwoodman gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>, vala-list <vala-list gnome org>
- Subject: Re: [Vala] Wrapping Errors
- Date: Sat, 22 Aug 2009 09:24:15 +0200
On Thu, Aug 20, 2009 at 22:09:21 -0400, Yu Feng wrote:
GError doesn't support error wrapping as Java does. Is GLib is purposely
If not, it will become a useful feature as the number of libraries that
uses GError grows, as the feature has already been proved useful in
Java, (indicated in this article):
Actually, in my opinion that article nicely explains, why you do *not* need
to have the original error information there.
article> The main reason one would use exception wrapping is to prevent the
article> code further up the call stack from having to know about every
article> possible exception in the system.
Well, so the code further up the call stack is not going to look at the
inner exception anyway except to print it to the operator, right? But for
that, it's enough to embed the wrapped error's message into the wrapping
error message. The error code is not relevant.
By the way, you should be suggesting things like this on the Gtk list, not
Jan 'Bulb' Hudec <bulb ucw cz>
] [Thread Prev