Contents (package MULK.OBJECTIVE-CL)


Condition Class EXCEPTION

Summary:

The condition type for Objective-C exceptions.

Description:

Whenever an Objective-C call made by means of invoke or invoke-by-name raises an exception, the exception is propagated to the Lisp side by being encapsulated in an exception object and signaled.

Note that it is currently impossible to directly extract the original Objective-C exception from an exception object, although it might arguably be desirable to do so. As exception objects behave just like id objects in almost all circumstances, this is not much of a problem, though. If you really do need an id instance rather than an exception, you can simply send it the `self' message.

Examples:

(With install-reader-syntax enabled.)

(handler-case  
    [NSArray selph]   ; oops, typo  
  (exception (e)  
    e))  
  ;=> #<MULK.OBJECTIVE-CL:EXCEPTION NSInvalidArgumentException {1048D63}>  
  
(class-of *)  
  ;=> #<CONDITION-CLASS EXCEPTION>  
  
(class-of [** self])  
  ;=> #<STANDARD-CLASS ID>  
 

See also:

id