Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Attributes | Package Attributes | Private Member Functions | Private Attributes
netscape.javascript.JSException Class Reference

JSException is an exception which is thrown when JavaScript code returns an error. More...

Collaboration diagram for netscape.javascript.JSException:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 JSException ()
 Constructs a JSException without a detail message.
 JSException (String s)
 Constructs a JSException with a detail message.
 JSException (String s, String filename, int lineno, String source, int tokenIndex)
 Constructs a JSException with a detail message and all the other info that usually comes with a JavaScript error.
int getWrappedExceptionType ()
 Instance method getWrappedExceptionType returns the int mapping of the type of the wrappedException Object.
Object getWrappedException ()
 Instance method getWrappedException.

Static Public Attributes

static final int EXCEPTION_TYPE_EMPTY = -1
static final int EXCEPTION_TYPE_VOID = 0
static final int EXCEPTION_TYPE_OBJECT = 1
static final int EXCEPTION_TYPE_FUNCTION = 2
static final int EXCEPTION_TYPE_STRING = 3
static final int EXCEPTION_TYPE_NUMBER = 4
static final int EXCEPTION_TYPE_BOOLEAN = 5
static final int EXCEPTION_TYPE_ERROR = 6

Package Attributes

String filename
int lineno
String source
int tokenIndex

Private Member Functions

 JSException (int wrappedExceptionType, Object wrappedException)
 Constructs a JSException with a wrapped JavaScript exception object.

Private Attributes

int wrappedExceptionType
Object wrappedException

Detailed Description

JSException is an exception which is thrown when JavaScript code returns an error.

Definition at line 48 of file JSException.java.


Constructor & Destructor Documentation

Constructs a JSException without a detail message.

A detail message is a String that describes this particular exception.

Deprecated:
Not for public use in future versions.

Definition at line 71 of file JSException.java.

                         {
       super();
        filename = "unknown";
        lineno = 0;
        source = "";
        tokenIndex = 0;
       wrappedExceptionType = EXCEPTION_TYPE_EMPTY;
    }

Constructs a JSException with a detail message.

A detail message is a String that describes this particular exception.

Parameters:
sthe detail message
Deprecated:
Not for public use in future versions.

Definition at line 87 of file JSException.java.

                                 {
       super(s);
        filename = "unknown";
        lineno = 0;
        source = "";
        tokenIndex = 0;
       wrappedExceptionType = EXCEPTION_TYPE_EMPTY;
    }
netscape.javascript.JSException.JSException ( int  wrappedExceptionType,
Object  wrappedException 
) [inline, private]

Constructs a JSException with a wrapped JavaScript exception object.

This constructor needs to be public so that Java users can throw exceptions to JS cleanly.

Definition at line 101 of file JSException.java.

                                                                           {
       super();
       this.wrappedExceptionType = wrappedExceptionType;
       this.wrappedException = wrappedException;
    }
netscape.javascript.JSException.JSException ( String  s,
String  filename,
int  lineno,
String  source,
int  tokenIndex 
) [inline]

Constructs a JSException with a detail message and all the other info that usually comes with a JavaScript error.

Parameters:
sthe detail message
Deprecated:
Not for public use in future versions.

Definition at line 114 of file JSException.java.


Member Function Documentation

Instance method getWrappedException.

Definition at line 135 of file JSException.java.

                                        {
       return wrappedException;
    }

Instance method getWrappedExceptionType returns the int mapping of the type of the wrappedException Object.

Definition at line 128 of file JSException.java.

                                         {
       return wrappedExceptionType;
    }

Member Data Documentation

Definition at line 55 of file JSException.java.

Definition at line 49 of file JSException.java.

Definition at line 56 of file JSException.java.

Definition at line 52 of file JSException.java.

Definition at line 54 of file JSException.java.

Definition at line 51 of file JSException.java.

Definition at line 53 of file JSException.java.

Definition at line 50 of file JSException.java.

Definition at line 58 of file JSException.java.

Definition at line 59 of file JSException.java.

Definition at line 60 of file JSException.java.

Definition at line 61 of file JSException.java.

Definition at line 63 of file JSException.java.

Definition at line 62 of file JSException.java.


The documentation for this class was generated from the following file: