getMessage()

Retrieve the message text from the exception object.

Syntax

String getMessage()
 

Return values

A String that contains the message associated with the exception object.

Notes

The getMessage() method is useful for extracting the exception text from the currentException system variable. This exception text can be included in a call to raiseException() to ensure that the reason for the exception is raised up to the next higher level of execution.

Note:
You can use the toString() method to retrieve the exception type and exception text from the current exception as a formatted string.

Copyright IBM Corp. 2003, 2004