API Docs for: 0.0.3
Show:

CDA.Exception Class

Defined in: lib/cda.js:479
Module: CDAjs

This class is used to indicate an runtime errors occurring in any of the methods of the CDAjs 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.

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

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

Constructor

CDA.Exception

()

Defined in lib/cda.js:479

Methods

getStackTrace

()

Defined in lib/cda.js:787

Get a stack trace.

Returns:

an array of objects describing the function on the stack

toString

()

Defined in lib/cda.js:776

Returns a string representing this exception

Returns:

a string representing this exception

Properties

args

Array

Defined in lib/cda.js:766

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 lib/cda.js:713

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

Default: null

data

String

Defined in lib/cda.js:752

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_CDA_OPTIONS_CODE

Int final static

Defined in lib/cda.js:590

Exception code indicating that missing options in the constructor.

Default: -2

ERROR_CDA_PASSWORD_CODE

Int final static

Defined in lib/cda.js:638

Exception code indicating that missing password for Pentaho authentication.

Default: -5

ERROR_CDA_URL_CODE

Int final static

Defined in lib/cda.js:576

Exception code indicating that missing the CDA URL.

Default: -1

ERROR_CDA_USERNAME_CODE

Int final static

Defined in lib/cda.js:624

Exception code indicating that missing username for Pentaho authentication.

Default: -4

ERROR_MISSING_DATA_ACCESS_ID_CODE

Int final static

Defined in lib/cda.js:652

Exception code indicating that missing data access id for CDA query.

Default: -6

ERROR_MISSING_PARAMS_CODE

Int final static

Defined in lib/cda.js:666

Exception code indicating that missing params object for invoke CDA endpoint.

Default: -7

ERROR_MISSING_PARAMS_PATH_CODE

Int final static

Defined in lib/cda.js:680

Exception code indicating that missing path property on object params for invoke CDA endpoint.

Default: -9

helpfile

String

Defined in lib/cda.js:742

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

Default: null

HTTP_ERROR_CODE

Int final static

Defined in lib/cda.js:604

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

message

String

Defined in lib/cda.js:721

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

Default: null

source

String

Defined in lib/cda.js:731

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

Default: null

type

String

Defined in lib/cda.js:696

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 lib/cda.js:550

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

Default: error

TYPE_WARNING

String final static

Defined in lib/cda.js:563

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

Default: warning