[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: error() or nil, 'error msg'
- From: Sean Conner <sean@...>
- Date: Thu, 18 Sep 2014 14:44:23 -0400
It was thus said that the Great Andrew Starks once stated:
> On Thu, Sep 18, 2014 at 1:22 PM, Tim Hill <drtimhill@gmail.com> wrote:
>
> > It really comes down to "where is the code that handles this condition?".
> > If it's close to the code that caused it, then the whole apparatus of
> > exceptions or pcalls() is just an ornate way of returning an error code
> > from the callee to the caller. If it's far away, then you WANT an exception
> > model so that you can avoid the absurd "ripple through" model where error
> > codes have to be returned up a winding call stack.
> >
> > And yes, there are some nasty examples that sit right in the middle, which
> > is why everyone argues for hours about stuff like this :)
> >
>
> If it doesn't work out, I'll invent some other method, and then realize
> that I've accidentally invented a poor-quality replacement for `nil,
> err_str`.
You might like reading about Common Lisp's conditions and restarts:
http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html
-spc
- References:
- error() or nil, 'error msg', Andrew Starks
- Re: error() or nil, 'error msg', Rena
- Re: error() or nil, 'error msg', Dirk Laurie
- Re: error() or nil, 'error msg', Andrew Starks
- Re: error() or nil, 'error msg', Tim Hill
- Re: error() or nil, 'error msg', Andrew Starks