[Ecls-list] CL_CATCH_ALL_BEGIN?
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Tue Mar 23 23:18:49 UTC 2010
On Tue, Mar 23, 2010 at 11:24 PM, Seth Burleigh <seth at tewebs.com> wrote:
> In a previous post, I didn't quite test all the possible cases. Now, the
> following code will go into a debugger if something like (a:hi) is typed
> into the command prompt. Error message:
>
> Cannot find the external symbol HI in #<"A" package>.[...]
> This time the error results from the c_string_to_object call. However,
> shouldn't this be caught by the CL_CATH_ALL_BEGIN clause?
> Also, is there any way to access the error object (and thus the error
> message) from the CL_CATCH_ALL_BEGIN clause?
I think you misunderstand the role of CL_CATCH_ALL_BEGIN. It does not catch
errors. It catches transfers of control, such as THROW, RETURN, QUIT, etc,
that would escape the environmen it sets up. The debugger will still be
entered and errors will still be signaled. Error handling has to be done in
Lisp, but the error handling code should be surrounded by a CL_CATCH... for
safety.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://tream.dreamhosters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100324/cb0add99/attachment.html>
More information about the ecl-devel
mailing list