[Ecls-list] CL_CATCH_ALL_BEGIN?

Seth Burleigh seth at tewebs.com
Wed Mar 24 01:37:36 UTC 2010


Ah, thanks for explaining. 
On Wed, 2010-03-24 at 00:18 +0100, Juan Jose Garcia-Ripoll wrote:
> 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






More information about the ecl-devel mailing list