[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Avr-libc-corelib] Error handling
From: |
Weddington, Eric |
Subject: |
RE: [Avr-libc-corelib] Error handling |
Date: |
Mon, 21 Sep 2009 18:10:14 -0600 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> gnu.org] On Behalf Of Ruud Vlaming
> Sent: Monday, September 21, 2009 4:52 PM
> To: address@hidden
> Subject: Re: [Avr-libc-corelib] Error handling
>
> On Monday 21 September 2009 23:27, Jan Waclawek wrote:
>
> Allthough i agree that mostly error codes are a waste (if
> they do not provide specific information)
> i strongly oppose the use of a single error variable. This
> makes concurrent use of the library
> virtually impossible. Lets make all code reentrant, or at
> least up to the point where
> the hardware dictates otherwise.
>
> But i think we don't have 'errors' in the classical way. An
> 'error' is a situation that the called
> function cannot handle. But i would say, that should not
> happen, or at least, since our
> state space of the functions is usually very small, the
> 'error' should be a natural part
> of the returned information, thus, no generic error handling.
Well said. I agree with you on all your points.
I won't rule out having a generic error variable, but I think it depends on the
requirements of the implementation. It is certainly easier to implement without
a generic error variable, if it can be done.