array('UTF-8', 'en'), 'content' => array('index.html', 'Contents'), 'home' => array('index.html', 'Core JavaScript Reference'), 'this' => array('lcjsexc.html', 'JSException'), 'prev' => array('classint.html', 'Java Classes, Constructors and Methods'), 'next' => array('lcjsobj.html', 'JSObject'), 'toc' => array( array('preface.html', 'About this Book', 0), /* array('preface.html#1003152', 'New Features in this Release', 1), array('preface.html#1005135', 'What You Should Already Know', 1), array('preface.html#1003515', 'JavaScript Versions', 1), array('preface.html#1001692', 'Where to Find JavaScript Information', 1), array('preface.html#1001745', 'Document Conventions', 1), */ array('partobj.html', 'Part 1', 0), array('objintro.html', 'Chapter 1. Objects, Methods, and Properties', 0), /* array('array.html', 'Array', 1), array('boolean.html', 'Boolean', 1), array('date.html', 'Date', 1), array('function.html', 'Function', 1), array('java.html', 'java', 1), array('javarray.html', 'JavaArray', 1), array('javclass.html', 'JavaClass', 1), array('javobj.html', 'JavaObject', 1), array('javpkg.html', 'JavaPackage', 1), array('math.html', 'Math', 1), array('netscape.html', 'netscape', 1), array('number.html', 'Number', 1), array('object.html', 'Object', 1), array('packages.html', 'Packages', 1), array('regexp.html', 'RegExp', 1), array('string.html', 'String', 1), array('sun.html', 'sun', 1), */ array('toplev.html', 'Chapter 2. Top-Level Properties and Functions', 0), /* array('toplev.html#1120957', 'decodeURI', 1), array('toplev.html#1119005', 'decodeURIComponent', 1), array('toplev.html#1118346', 'encodeURI', 1), array('toplev.html#1115986', 'encodeURIComponent', 1), array('toplev.html#1063795', 'eval', 1), array('toplev.html#1063963', 'Infinity', 1), array('toplev.html#1063988', 'isFinite', 1), array('toplev.html#1064024', 'isNaN', 1), array('toplev.html#1064064', 'NaN', 1), array('toplev.html#1064092', 'Number', 1), array('toplev.html#1064132', 'parseFloat', 1), array('toplev.html#1064173', 'parseInt', 1), array('toplev.html#1064506', 'String', 1), array('toplev.html#1094680', 'undefined', 1), */ array('partlang.html', 'Part 2', 0), array('stmt.html', 'Chapter 3. Statements', 0), /* array('stmt.html#1081298', 'break', 1), array('stmt.html#1077887', 'const', 1), array('stmt.html#1078923', 'continue', 1), array('stmt.html#1037353', 'do...while', 1), array('stmt.html#1016648', 'export', 1), array('stmt.html#1004804', 'for', 1), array('stmt.html#1004815', 'for...in', 1), array('stmt.html#1004825', 'function', 1), array('stmt.html#1004833', 'if...else', 1), array('stmt.html#1082618', 'import', 1), array('stmt.html#1018088', 'label', 1), array('stmt.html#1004871', 'return', 1), array('stmt.html#1018610', 'switch', 1), array('stmt.html#1052196', 'throw', 1), array('stmt.html#1051663', 'try...catch', 1), array('stmt.html#1066604', 'var', 1), array('stmt.html#1004896', 'while', 1), array('stmt.html#1004910', 'with', 1), */ array('comment.html', 'Chapter 4. Comments', 0), /* array('comment.html#1066617', 'comment', 1), */ array('ops.html', 'Chapter 5. Operators', 0), /* array('ops.html#1042274', 'Assignment Operators', 1), array('ops.html#1060974', 'Comparison Operators', 1), array('ops.html#1050908', 'Using the Equality Operators', 2), array('ops.html#1042400', 'Arithmetic Operators', 1), array('ops.html#1042403', '% (Modulus)', 2), array('ops.html#1042412', '++ (Increment)', 2), array('ops.html#1042421', '-- (Decrement)', 2), array('ops.html#1042430', '- (Unary Negation)', 2), array('ops.html#1042437', 'Bitwise Operators', 1), array('ops.html#1042500', 'Bitwise Logical Operators', 2), array('ops.html#1042512', 'Bitwise Shift Operators', 2), array('ops.html#1044813', 'Logical Operators', 1), array('ops.html#1042582', 'String Operators', 1), array('ops.html#1042588', 'Special Operators', 1), array('ops.html#1045406', '?: (Conditional operator)', 2), array('ops.html#1045439', ', (Comma operator)', 2), array('ops.html#1045837', 'delete', 2), array('ops.html#1066344', 'function', 2), array('ops.html#1066286', 'in', 2), array('ops.html#1055015', 'instanceof', 2), array('ops.html#1055898', 'new', 2), array('ops.html#1043482', 'this', 2), array('ops.html#1042603', 'typeof', 2), array('ops.html#1042625', 'void', 2), */ array('partjava.html', 'Part 3. LiveConn', 0), array('classint.html', 'Chapter 6. Java Classes, Constructors, and Methods', 0), array('lcjsexc.html', 'JSException', 1), array('lcjsobj.html', 'JSObject', 1), array('partapp.html', 'Part 4', 0), array('keywords.html', 'Appendix A. Reserved Words', 0), array('deprecat.html', 'Appendix B. Deprecated Features', 0), array('ix.html#573', 'Index', 0) ))); manual_header(); ?>
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: