API Docs for:
Show:

Xmla.Exception Class

Defined in: src/Xmla.js:6705
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:6705

Methods

getStackTrace

()

Defined in src/Xmla.js:7070

Get a stack trace.

Returns:

an array of objects describing the function on the stack

toString

()

Defined in src/Xmla.js:7062

Returns a string representing this exception

Returns:

a string representing this exception

Properties

args

Array

Defined in src/Xmla.js:7055

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:7016

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

Default: {null}

data

String

Defined in src/Xmla.js:7044

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:6979

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:6870

Exception code indicating that the rrepsonse could not be parsed

Default: <code>-8</code>

helpfile

String

Defined in src/Xmla.js:7037

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:6899

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:6964

Exception code indicating illegal number of axis arguments

Default: <code>-14</code>

INVALID_AXIS

Int final static

Defined in src/Xmla.js:6949

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:6856

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:6884

Exception code indicating the field name is not valid.

Default: <code>-9</code>

INVALID_HIERARCHY_CDE

Int final static

Defined in src/Xmla.js:6919

Exception code indicating the hierarchy name is not valid.

Default: <code>-11</code>

message

String

Defined in src/Xmla.js:7023

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:6768

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:6782

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:6797

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:6812

Exception code indicating a events were expected but ommitted.

Default: <code>-4</code>

source

String

Defined in src/Xmla.js:7030

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:7006

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

TYPEWARNING
Indicates a warning
TYPEERROR
Indicates an error

Default: {null}

TYPE_ERROR

String final static

Defined in src/Xmla.js:6754

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:6743

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:6934

Exception code indicating a problem reading a member property

Default: <code>-12</code>

UNKNOWN_EVENT_CDE

Int final static

Defined in src/Xmla.js:6842

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:6827

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

Default: <code>-5</code>