Table of Contents | Previous | Next | Index


JSException

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

Method Description
getWrappedException

Instance method getWrappedException.

The following sections show the declaration and usage of the constructors and method.

Backward Compatibility

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.


JSException

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)

Arguments

s

The detail message.

filename

The URL of the file where the error occurred, if possible.

lineno

The line number if the file, if possible.

source

The string containing the JavaScript code being evaluated.

tokenIndex

The index into the source string where the error occurred.


getWrappedException

Instance method getWrappedException.

Declaration

public Object getWrappedException()

Table of Contents | Previous | Next | Index

Last Updated: 10/29/98 20:17:49

Copyright � 1998 Netscape Communications Corporation