This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Interest in xfig



> Is there a suggested manner for handling the ``dead object'' error?
> Should functions return #f or should the script crash? For that matter,
> is there any centralised method for handling errors in guile? Suppose I
> write a handy couple of scheme routines... is it OK to call (error) in
> the middle of one of them or will this lead to a situation where those
> routines cannot be used by some project?

You should call scm_error to report the error.  Then your clients
don't have to check for #f all the time, but can handle errors if
they're expecting them, and the REPL can report problems gracefully.

See throw.c for functions you can use to handle errors; the code is
pretty thoroughly documented.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]