This is the mail archive of the guile@sourceware.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: how can I reliably learn why a system call failed?


Eric Hanchrow <offby1@blarg.net> writes:

> And I suppose I could test against the numeric data -- but unless I
> parse errno.h myself, I don't see how my program is supposed to know
> that the number 17 means EEXIST.

There is a variable available in Guile named "EEXIST" that has the
value 17.  Likewise for all other errno values.

I think the best you can do is look at the fourth element of the throw
args (after making sure that the first is the symbol `system-error').

- Marius

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