CVS update: gnucash/src/engine

linas@linas.org linas@linas.org
Tue, 7 Nov 2000 15:23:08 -0600 (CST)


It's been rumoured that Dave Peticolas said:
> 
> 
> Date:	Tuesday November 7, 2000 @ 2:55
> Author:	peticolas
> 
> Update of /home/cvs/cvsroot/gnucash/src/engine
> In directory www.linas.org:/tmp/cvs-serv11019
> 
> Modified Files:
> 	GNCId.c 
> Log Message:
> Improve error message.

Dave, maybe a minor point at this point, but the engine wasn't supposed
to have error messages in it; if there's an error condition, then
there'd be a code that could be queried using xaccGetError() or some
such thing.    This allows error handling by the engine users to be 
done in a try-catch-throw block style.

/* try block */
xaccClearError();
xaccDoThis();
xaccDoThat();
xaccDoOther();

/* catch block */
if (xaccGetError()) {
   printf ("whatever\n");
}

--linas