GNOME Bugzilla – Bug 354075
Transition Camel's error-handling to GError?
Last modified: 2010-07-08 18:41:21 UTC
Camel currently implements its own error-handling system that is very similar to the GError API provided by GLib [1], and offers no advantages over GError as far as I can see. Also, Camel's error-handling logic has some issues on which I expounded in bug #352248. GError offers several advantages over CamelException: 1) GErrors are only allocated when an error has actually occured. 2) GError issues a helpful warning when errors pile up, since this indicates a programming error. CamelException simply overwrites the previous error. 3) GError is the standard error-reporting system in GNOME. 4) The GError API is easier to use (in my opinion). I'm filing this bug as a feeler to see if there is interest in eventually dropping the CamelException API in favor of GError. This of course will cause widespread changes to Camel's API, so I'm also interested in discussing a timeframe in which introducing such a change would be feasible. [1] http://developer.gnome.org/doc/API/2.0/glib/glib-Error-Reporting.html
varadhan, any comments here?
This is going to introduce a lot public API changes. But I am 100% pro.
Bumping version to a stable release.
Fixed at last for 2.31.5. http://git.gnome.org/browse/evolution-data-server/commit/?id=46938c348728d1c8bcacf6df9e0788b39783bd07 Note: Camel uses G_IO_ERROR codes pretty heavily now, since we're moving toward replacing CamelStream with GIO streams and other redundant constructs.