API Docs for:
Show:

Xmla.Exception Class

Defined in: ../src/Xmla.js:6964
Module: xmla

This class is used to indicate an runtime errors occurring in any of the methods of the xmla4js classes.

You do not need to instantiate objects of this class yourself. Rather, instances of this class are created and thrown at runtime whenever an error occurs. The purpose is to provide a clean and clear way for applications that use xmla4js to recognize and handle Xmla4js specific runtime errors.

To handle Xmla4js errors, you can use a try...catch block like this:

 try {
     ...general xmla4js work...
 } catch (exception) {
     if (exception instanceof Xmla.Exception) {
         ...use exception.code, exception.message and exception.data to handle the exception.
     } else {
         ...handle other errors...
     }
 }

Constructor

Xmla.Exception

()

Defined in ../src/Xmla.js:6964

Methods

getStackTrace

()

Defined in ../src/Xmla.js:7329

Get a stack trace.

Returns:

an array of objects describing the function on the stack

toString

()

Defined in ../src/Xmla.js:7321

Returns a string representing this exception

Returns:

a string representing this exception

Properties

args

Array

Defined in ../src/Xmla.js:7314

A reference to the built-in arguments array of the function that is throwing the exception This can be used to get a "stack trace"

code

Int

Defined in ../src/Xmla.js:7275

A code that can be used to identify this particular kind of exception.

Default: {null}

data

String

Defined in ../src/Xmla.js:7303

Additional data captured when the exception was instantiated. The type of information stored here is dependent upon the nature of the error.

Default: {null}

ERROR_INSTANTIATING_XMLHTTPREQUEST

Int final static

Defined in ../src/Xmla.js:7238

Exception code indicating that we couldn't instantiate a xml http request object

Default: <code>-15</code>

ERROR_PARSING_RESPONSE_CDE

Int final static

Defined in ../src/Xmla.js:7129

Exception code indicating that the rrepsonse could not be parsed

Default: <code>-8</code>

helpfile

String

Defined in ../src/Xmla.js:7296

A path or url that points to a document that contains more information about this error.

Default: {null}

HTTP_ERROR_CDE

Int final static

Defined in ../src/Xmla.js:7158

Exception code indicating a general XMLHttpRequest error. If this error occurs, the data object of the exception will have these members:

  • request: the options that make up the original HTTP request
  • status: the HTTP status code
  • statusText: the HTTP status text

Default: <code>-10</code>

ILLEGAL_ARGUMENT

Int final static

Defined in ../src/Xmla.js:7223

Exception code indicating illegal number of axis arguments

Default: <code>-14</code>

INVALID_AXIS

Int final static

Defined in ../src/Xmla.js:7208

Exception code indicating the requested axis does not exist

Default: <code>-13</code>

INVALID_EVENT_HANDLER_CDE

Int final static

Defined in ../src/Xmla.js:7115

Exception code indicating that no proper handler was passed for the events.

Default: <code>-7</code>

INVALID_FIELD_CDE

Int final static

Defined in ../src/Xmla.js:7143

Exception code indicating the field name is not valid.

Default: <code>-9</code>

INVALID_HIERARCHY_CDE

Int final static

Defined in ../src/Xmla.js:7178

Exception code indicating the hierarchy name is not valid.

Default: <code>-11</code>

message

String

Defined in ../src/Xmla.js:7282

A human readable message that describes the nature of the error or warning.

Default: {null}

MISSING_REQUEST_TYPE_CDE

Int final static

Defined in ../src/Xmla.js:7027

Exception code indicating a requestType option was expected but ommitted.

Default: <code>-1</code>

MISSING_STATEMENT_CDE

Int final static

Defined in ../src/Xmla.js:7041

Exception code indicating a statement option was expected but ommitted.

Default: <code>-2</code>

MISSING_URL_CDE

Int final static

Defined in ../src/Xmla.js:7056

Exception code indicating a url option was expected but ommitted.

Default: <code>-3</code>

NO_EVENTS_SPECIFIED_CDE

Int final static

Defined in ../src/Xmla.js:7071

Exception code indicating a events were expected but ommitted.

Default: <code>-4</code>

source

String

Defined in ../src/Xmla.js:7289

A name that indicates in what component (on the client or server side) this error or warning occurred.

Default: {null}

type

String

Defined in ../src/Xmla.js:7265

This propery indicates what kind of exception occurred. It can have one of the following values:

TYPE_WARNING
Indicates a warning
TYPE_ERROR
Indicates an error

Default: {null}

TYPE_ERROR

String final static

Defined in ../src/Xmla.js:7013

Can appear as value for the type property of instances of the Xmla.Exception class, and indicates that this Xmla.Exception signals an error.

Default: <code>error</code>

TYPE_WARNING

String final static

Defined in ../src/Xmla.js:7002

Can appear as value for the type property of instances of the Xmla.Exception class, and indicates that this Xmla.Exception signals a warning.

Default: <code>warning</code>

UNEXPECTED_ERROR_READING_MEMBER_CDE

Int final static

Defined in ../src/Xmla.js:7193

Exception code indicating a problem reading a member property

Default: <code>-12</code>

UNKNOWN_EVENT_CDE

Int final static

Defined in ../src/Xmla.js:7101

Exception code indicating that the event name was unrecognized.

Default: <code>-6</code>

WRONG_EVENTS_FORMAT_CDE

Int final static

Defined in ../src/Xmla.js:7086

Exception code indicating a events were specifeid in the wrong format.

Default: <code>-5</code>