gEDA-dev: libgeda error reporting
Ivan Stankovic
ivan.stankovic at fer.hr
Mon Jul 2 16:25:23 EDT 2007
On Mon, Jul 02, 2007 at 06:51:53PM +0100, Peter TB Brett wrote:
> On Monday 02 July 2007 17:35:12 Ales Hvezda wrote:
> > Originally intended, but should be removed or fixed now.
> > libgeda calls should return error status and if necessary
> > write something to the log.
>
> The GError mechanism would be suitable, I think.
Peter, I looked at GError and it seems to require
adding a GError ** argument to every function that can
fail, which is pretty ugly. Overall, I find GError
clumsy.
What I would prefer is the simple errno-like behaviour:
1. call a function
2. check the return value
3. if it's NULL or < 0 or whatever convention we agree on,
print the error string
The main problem with this is how to make error codes
and strings thread safe. Thoughts?
--
Ivan Stankovic, ivan.stankovic at fer.hr
"Protect your digital freedom and privacy, eliminate DRM,
learn more at http://www.defectivebydesign.org/what_is_drm"
More information about the geda-dev
mailing list