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

java-definition-error

java-class-error

java-method-error

java-field-error Condition Classes

Summary

Conditions that are signaled when code defined by the Java interface fails to execute.

Package

lw-ji

Superclasses

java-interface-error

Readers

java-definition-error-class-name
java-definition-error-name
java-method-error-method-name
java-method-error-args-num
java-field-error-field-name
java-field-error-static-p

Description

Instances of the condition classes java-class-error, java-method-error and java-field-error are signaled when code that is defined by the Java interface (for example, define-java-caller, define-field-accessor) fails to execute because the Java entity that it expects is not found.

They are subclasses of java-definition-error. java-definition-error is never signaled, and you should not signal these conditions.

The errors normally occur because the definition is wrong in some sense, but they can also happen if the Java virtual machine misses some of the classes or has a class definition that differs from what it should be.

java-definition-error-name returns the name of the Lisp function that fails, for example the name in the define-java-caller form.

java-definition-error-class-name returns the class name in the definition.

For a java-method-error, java-method-error-method-name returns the method name (or nil if it is a constructor, see define-java-constructor) and java-method-error-args-num returns the number of arguments that were passed to the call.

For a java-field-error, java-field-error-field-name returns the field name and java-field-error-static-p queries whether the field was defined as static.

See also

define-java-constructor
define-java-caller
define-field-accessor


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:46