[LispM-Hackers] Error handling

James A. Crippen james@UnLambda.COM
Mon, 9 Apr 2001 09:39:03 -0800 (AKDT)


On Sun, 8 Apr 2001, John Morrison wrote:

> Hi;
> 
> On Sunday 08 April 2001 05:14, James A. Crippen wrote:
> > I'm working out on paper a good method for handling errors after realizing
> > that my first attempt isn't going to be very scalable and isn't really in
> > the OO spirit.
> 
> It will certainly be less trouble to implement upon bare iron than...
> 
> > Instantiated objects are exceptions to be thrown.  Exceptions are passed
> > upwards until they are caught, perhaps at the top level.
> 
> If we use C++ exception-handling, then things will get really, really, really 
> hard to port to bare iron.  I *very* briefly looked into using exceptions on 
> bare iron for the JOS project, but it seemed to require either a lot of 
> house-keeping and/or sucking in a whole bunch of LGPL'ed code and tweaking it 
> (hey, we're not running on a POSIX platform any longer) which would've 
> tripped the hard GPL.  So, I punted.

You don't like try/catch? :)

What in particular was giving you headaches with exceptions then?

I honestly think that the error system can be rewritten to include support
for bare metal later on rather than hampering all the other systems out
there whose ports would benefit from exceptions.  But if you can convince
me otherwise (or come up with a better solution) then as usual I'm
perfectly willing to abandon this idea.

'james

-- 
James A. Crippen <james@unlambda.com> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.