Class actuate.Exception
Description
A container for an uncategorized exception 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:
*ERR_CLIENT: Exception type for a client-side error
*ERR_SERVER: Exception type for a server error
*ERR_USAGE: Exception type for a JSAPI usage error
Function summary
Table 11‑3 lists actuate.Exception functions.
Table 11‑3 actuate.Exception functions 
Function
Description
getDescription( )
Returns details of the exception
getErrCode( )
Returns error code for server-side exceptions
getMessage( )
Returns a short message about the exception
getType( )
Returns the type of exception error
actuate.Exception.getDescription
Syntax
string Exception.getDescription( )
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:
*Server error: The SOAP string
*Client error: For the Firefox browser, a list comprised of fileName+number+stack
*Usage error: Any values set in the object generating the exception
Example
This example displays the server error description in an alert box:
alert("Server error: " + Exception.getDescription( ));
actuate.Exception.getErrCode
Syntax
string Exception.getErrCode( )
Returns the error code for server exceptions.
Returns
String. A server error code.
Example
This example displays the server error code in an alert box:
alert("Server error: " + Exception.getErrCode( ));
actuate.Exception.getMessage
Syntax
string Exception.getMessage( )
Returns a short message about the exception. This message is set for an actuate.Exception object with the actuate.Exception.initJSException( ) function.
Returns
String. A server error code.
Example
This example displays the error’s short message code in an alert box:
alert("Error Message: " + Exception.getMessage( ));
actuate.Exception.getType
Syntax
string Exception.getType( )
Returns the type of the exception:
*ERR_CLIENT: Exception type for a client-side error
*ERR_SERVER: Exception type for a server error
*ERR_USAGE: Exception type for a Actuate JavaScript API usage error
Returns
String. A server error code.
Example
This example displays the error type in an alert box:
alert("Error type: " + Exception.getType( ));