Class actuate.Exception
Description
A container for an uncategorized exceptions that also supports specific exceptions. Exception provides an object to pass to a callback function or event handler when an exception occurs. The Exception object contains references to the exception’s origin, description, and messages.
Constructor
The Exception object is constructed when unspecified exceptions occur. The exceptions are divided into three types, which determine the contents of the exception object. These types are:
Function summary
Table 4-16 lists actuate.Exception functions.
Table 4-16 actuate.Exception functions getType( )actuate.Exception.getDescription
Syntax
Returns exception details as provided by the Server, Client, and User objects.
Returns
String. A detailed description of the error. Information is provided according to the type of exception generated, as shown below:
n Client error: For the Firefox browser, a list comprised of fileName+number+stack.Example
This example displays the server error description in an alert box.
actuate.Exception.getErrCode
Syntax
Returns the error code for Server exceptions.
Returns
Example
This example displays the server error code in an alert box.
actuate.Exception.getMessage
Syntax
Returns a short message about the exception. This message is set for an actuate.Exception object with the actuate.Exception.initJSException( ) function.
Returns
Example
This example displays the error’s short message code in an alert box.
actuate.Exception.getType
Syntax
Returns the type of the exception:
Returns
Example
This example displays the error type in an alert box.
actuate.Exception.isExceptionType
Syntax
Compares the input object to the exception contained in this actuate.Exception object to the exceptionType object argument.
Parameters
Object. Either an exception object, such as an instance of actuate.Viewer.ViewerException, or the name of an exception class as a string.
Returns
Boolean. Returns True if the exception contained in this actuate.Exception object matches the exceptionType object argument.
Example
To alert the user when the exception e is a usage error, use code similar to the following:
(c) Copyright Actuate Corporation 2011 |
![]() |