This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: how can I reliably learn why a system call failed?
- To: Eric Hanchrow <offby1 at blarg dot net>
- Subject: Re: how can I reliably learn why a system call failed?
- From: Marius Vollmer <mvo at zagadka dot ping dot de>
- Date: 11 May 2000 22:18:40 +0200
- Cc: guile at sourceware dot cygnus dot com
- References: <87ya5gvq4p.fsf@potato.hanchrow.org>
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