Previous Contents Index Next |
Core JavaScript Reference 1.5 |
The public class JSException extends RuntimeException.
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----netscape.javascript.JSException
Description
JSException is an exception which is thrown when JavaScript code returns an error.
Constructor Summary
The netscape.javascript.JSException class has the following constructors:
Constructor
Description
JSException
Deprecated constructors optionally let you specify a detail message and other information.
Method Summary
The netscape.javascript.JSException class has the following methods:
Method
Description
getWrappedException
getWrappedExceptionType
Instance method getWrappedExceptionType returns the int mapping of the type of the wrappedException object.
The following sections show the declaration and usage of the constructors and method.
JavaScript 1.1 through 1.3. JSException had three public constructors which optionally took a string argument, specifying the detail message or other information for the exception. The getWrappedException method was not available.
Constructors, deprecated in JavaScript 1.4. Constructs a JSException with an optional detail message.
Declaration
1. public JSException()2. public JSException(String s)
3. public JSException(String s,
String filename,
int lineno,
String source,
int tokenIndex)
s
filename
lineno
source
tokenIndex
Instance method getWrappedException.
Declaration
public Object getWrappedException()
Description
getWrappedException() returns an object that represents the value that the JavaScript actually threw. JavaScript can throw any type of value. Use getWrappedException() to determine what kind of value the Object return type represents.
Instance method getWrappedExceptionType.
Declaration
public int getWrappedExceptionType()
Description
getWrappedExceptionType() returns an int that matches one of the following static ints declared by the JSException class:
Previous Contents Index Next
Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated
September 28, 2000