Lisp HUG Maillist Archive

catching errors

Dear all,

CLtL2 defines ony functions to raise errors (cerror error ...) but does 
not define error handling facilities. Unfortunately, I coudn't spot the 
point in the Lispworks definition hwre this topic is taken up. Has 
Lispworks some kimd of catch-error?

Reinhard Oldenburg


Re: catching errors

Reinhard Oldenburg wrote:
> 
> Dear all,
> 
> CLtL2 defines ony functions to raise errors (cerror error ...) but does 
> not define error handling facilities. Unfortunately, I coudn't spot the 
> point in the Lispworks definition hwre this topic is taken up. Has 
> Lispworks some kimd of catch-error?
> 
> Reinhard Oldenburg

??? CL defines a fairly powerful standard error handling mechanism. See 
handler-bind and handler-case in the Hyperspec


-- 
Chris Riesbeck

Home page: http://www.cs.northwestern.edu/~riesbeck/
Calendar: http://calendar.yahoo.com/criesbeck


Re: catching errors

It's already in CLtL2. You're looking for handler-case and handler-bind.

Pascal

On 10 Sep 2008, at 17:05, Reinhard Oldenburg wrote:

>
> Dear all,
>
> CLtL2 defines ony functions to raise errors (cerror error ...) but  
> does not define error handling facilities. Unfortunately, I coudn't  
> spot the point in the Lispworks definition hwre this topic is taken  
> up. Has Lispworks some kimd of catch-error?
>
> Reinhard Oldenburg
>

-- 
Pascal Costanza, mailto:pc@p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium







Re: catching errors

I've found the chapter, "19. Beyond Exception Handling: Conditions and
Restarts" of Peter Seibel's "Practical Common Lisp" particularly
useful as it explains some of the things that make the CL condition
handling system different than what is present in other languages:

http://gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html

On Wed, Sep 10, 2008 at 11:05 AM, Reinhard Oldenburg
<oldenbur@math.uni-frankfurt.de> wrote:
>
> Dear all,
>
> CLtL2 defines ony functions to raise errors (cerror error ...) but does not
> define error handling facilities. Unfortunately, I coudn't spot the point in
> the Lispworks definition hwre this topic is taken up. Has Lispworks some
> kimd of catch-error?
>
> Reinhard Oldenburg
>
>



-- 
=====================
Joshua Taylor
tayloj@cs.rpi.edu, jtaylor@alum.rpi.edu

"A lot of good things went down one time,
 back in the goodle days."
 John Hartford


Re: catching errors

Reinhard Oldenburg schrieb:
> 
> Dear all,
> 
> CLtL2 defines ony functions to raise errors (cerror error ...) but does 
> not define error handling facilities. Unfortunately, I coudn't spot the 
> point in the Lispworks definition hwre this topic is taken up. Has 
> Lispworks some kimd of catch-error?
> 
> Reinhard Oldenburg
> 
> 
see 
http://gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html

Jens


Re: catching errors


Am 10.09.2008 um 17:05 schrieb Reinhard Oldenburg:

>
> Dear all,
>
> CLtL2 defines ony functions to raise errors (cerror error ...) but  
> does not define error handling facilities. Unfortunately, I coudn't  
> spot the point in the Lispworks definition hwre this topic is taken  
> up. Has Lispworks some kimd of catch-error?
>
> Reinhard Oldenburg

It is chapter 29 in CLtL2:

  http://lispm.dyndns.org/documentation/cltl2/clm/node312.html#SECTION003300000000000000000

But you should move on to the Common Lisp Hyperspec, which is provided  
by LispWorks. The HyperSpec
is kind of a version of the ANSI Common Lisp specification. CLtL2  
describes a version of Common Lisp
between CLtL1 and the ANSI CL Spec. CLtL2 is useful for some  
background information, but in
several areas there are changes -  so the ANSI CL spec is a better  
source for information
about the Common Lisp language as it is provided by implementations  
nowadays.

In LispWorks, look at the Help menu. Select 'manuals' and there the  
'ANSI Common Lisp standard'.
The HyperSpec appears then in your browser (I hope!). Go to  
'contents'. Chapter 9 is
about the condition system.

As mentioned, Peter Seibel's book explain some error handling using  
the condition system in his book
'Practical Common Lisp'.

Regards,

Rainer Joswig

Rainer Joswig, Hamburg, Germany
http://lispm.dyndns.org/
mailto:joswig@lisp.de


Updated at: 2020-12-10 08:42 UTC