[Ecls-list] Lisp errors & ERRNO

Tobias C. Rittweiler tcr at freebits.de
Tue Mar 16 16:49:53 UTC 2010


"Tobias C. Rittweiler" <tcr at freebits.de>
writes:

> 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?

So I'm wondering about Windows. FElibc_error is not conditionalized out
on Windows -- so however ECL is build there, strerror(3) must be
available there, too?

I was about making EXT:STRERROR (the lisp function) expect an error code
(as returned by GetLastError()) on Windows. Is errno used in Windows at
all?

  -T.





More information about the ecl-devel mailing list