All Manuals > LispWorks User Guide and Reference Manual > 41 The LW-JI Package

NextPrevUpTopContentsIndex

java-method-exception

Condition
Summary

Conditions signaled when an exception occurs inside a call to a Java method or constructor.

Package

lw-ji

Superclasses

java-normal-exception

Subclasses

None.

Readers

java-method-exception-name
java-method-exception-class-name
java-method-exception-method-name
java-method-exception-args

Description

The condition class java-method-exception is signaled when an exception occurs inside a call to a Java method or a constructor. Such exceptions are normal behavior for Java, so these exceptions should in general be handled somehow.

The java-exception accessors (java-exception-exception-name, java-exception-string) can be used on a java-method-exception and are useful for simple handling. For more complex handling, you can use catching-java-exceptions around pieces of your code, and then look at the actual Java exception.

The reader java-method-exception-name returns the name of the Java caller (a Lisp symbol) that caused the exception.

The reader java-method-exception-class-name returns the Java class name of the method or constructor.

The reader java-method-exception-method-name returns the method name if the exception is inside a method, or nil if the exception is inside a constructor.

The reader java-method-exception-args returns the arguments that were passed to the caller.

See also

catching-java-exceptions
java-exception


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex