After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 354075 - Transition Camel's error-handling to GError?
Transition Camel's error-handling to GError?
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
1.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-09-03 04:35 UTC by Matthew Barnes
Modified: 2010-07-08 18:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Matthew Barnes 2006-09-03 04:35:49 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
Comment 1 André Klapper 2006-09-26 22:36:13 UTC
varadhan, any comments here?
Comment 2 Philip Van Hoof 2006-10-17 12:13:29 UTC
This is going to introduce a lot public API changes. But I am 100% pro.
Comment 3 Matthew Barnes 2008-03-11 00:59:05 UTC
Bumping version to a stable release.
Comment 4 Matthew Barnes 2010-07-08 18:41:21 UTC
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.