gEDA-dev: libgeda error reporting

Peter TB Brett peter at peter-b.co.uk
Mon Jul 2 16:22:52 EDT 2007


On Monday 02 July 2007 20:34:49 Ivan Stankovic wrote:
> On Mon, Jul 02, 2007 at 12:35:12PM -0400, Ales Hvezda wrote:
> > > While working on gattrib, I noticed that libgeda
> > > prints errors and uses calls like fprintf(stderr, ...).
> > >
> > > So when you try to open up a nonexistant file in
> > > a program using libgeda (gattrib in this case), you
> > > get errors both from libgeda and from the program.
> > > Is this intended?
> >
> > Originally intended, but should be removed or fixed now.
> > libgeda calls should return error status and if necessary
> > write something to the log.
>
> Actually, I would rather avoid writing anything to
> log files (or stdout/stderr) from libgeda, as this
> seems better handled by programs using libgeda
> functions.
>
> I'll investigate GError, as suggested by Peter, and
> see if I can come up with a reasonable patch.

I would suggest a large series of small patches.  Don't forget every piece of 
code which uses that function will also need to be updated.

Smaller patches will be easier to audit for problems, as well.

Cheers,

                          Peter

-- 
Fisher Society committee                    http://tinyurl.com/o39w2
CUSBC novices, match and league secretary   http://tinyurl.com/mwrc9
CU Spaceflight                              http://tinyurl.com/ognu2

v3sw6YChw7$ln3pr6$ck3ma8u7+Lw3+2m0l7Ci6e4+8t4Gb8en6g6Pa2Xs5Mr4p4
  hackerkey.com                                  peter-b.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20070702/fbdb7323/attachment.pgp 


More information about the geda-dev mailing list