[Ecls-list] Lisp errors & ERRNO
Tobias C. Rittweiler
tcr at freebits.de
Mon Mar 15 17:25:33 UTC 2010
Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> writes:
> On Mon, Mar 15, 2010 at 6:07 PM, Tobias C. Rittweiler <tcr at freebits.de>wrote:
>
>> I'm talking about Lisp sugar on top of strerror for that and similiar
>> cases.
>>
>
> I now see what you mean. I would use conditions that derive from
> simple-error and include the errno and the message. We can provide a lisp
> function, ext:strerror. Then FElibc_error() and other functions
> (serve-event) can signal the error using cl_error, the name of the condition
> and a list of arguments, like we already do for other conditions.
So:
* make strerror available to Lisp as ext:strerror
* introduce new condition type (perhaps ERROR-WITH-ERRNO?) and make it
have an errno slot. I think an condition type could come handy.
* modify FElibc_error to use @'cl:error', @'ext:strerror', and signal
an ERROR-WITH-ERRNO.
D'accord?
-T.
More information about the ecl-devel
mailing list