From: Trastabuga
Subject: Recovering from an exception
Date: 
Message-ID: <1143651215.337095.301480@i40g2000cwc.googlegroups.com>
Hi

I started to evaluate the process of using lisp for building web
applications.
I got cmucl running under detachtty with slime server started so I can
modify the code while running the web app.
Also it's pretty easy to handle an error when it happens while running
lisp under slime.
For example when my code tries to open a file that doesn't exist it
shows a message in slime:
File-error in function LISP::FD-OPEN:
   Error opening #p"/WebLogs/WebSite/2006/03/29-access.log", No such
file or directory.
   [Condition of type KERNEL:SIMPLE-FILE-ERROR]

Restarts:
  0: [CONTINUE] Return NIL.
  1: [DESTROY] Destroy the process

So I modify the code and hit 0 so the process continues.

Now what happens when the same bug happens when no slime connected?
That's what happened tonight, I tried to open the web app and it hung,
so the same file open error happened. When I tried to connect to the
running lisp with slime, it didn't show me the error frames and
continued to work as nothing had happened. Same with attachtty, when I
connected with attachtty, it didn't show me the error stack either.
I had no other choice but to kill the previous detachtty and run the
new one and debug the problem with slime. Is it how those problems are
handled in real life or there are some ways to fix the problem without
restarting the running lisp?

Thank you,
Andrei
From: =?iso-8859-1?B?QXVy6WxpZW4=?=
Subject: Re: Recovering from an exception
Date: 
Message-ID: <1143709840.681429.139210@i40g2000cwc.googlegroups.com>
Hello,

what you need is probably :

a) one handler to catch these errors when they are signaled (see
HANDLER-BIND)
b) one or several restarts that define resumption points in the dynamic
chain between the operation that signals and the handler (see
RESTART-BIND)

Cheers,
Aurélien.