JavaScript is disabled on your browser.
JavaScript is disabled on your browser.
All Implemented Interfaces:
Serializable
public class ScriptException
extends Exception
The generic Exception
class for the Scripting APIs. Checked
exception types thrown by underlying scripting implementations must be wrapped in instances of
ScriptException
. The class has members to store line and column numbers and
filenames if this information is available.
Since:
1.6
See Also:
Serialized Form
Constructor Summary
Constructors
Constructor
Description
ScriptException (Exception e)
Creates a ScriptException
wrapping an Exception
thrown by an underlying
interpreter.
ScriptException (String s)
Creates a ScriptException
with a String to be used in its message.
ScriptException (String message,
String fileName,
int lineNumber)
Creates a ScriptException
with message, filename and linenumber to
be used in error messages.
ScriptException (String message,
String fileName,
int lineNumber,
int columnNumber)
ScriptException
constructor specifying message, filename, line number
and column number.
Method Summary
Methods declared in class java.lang.Throwable
addSuppressed , fillInStackTrace , getCause , getLocalizedMessage , getStackTrace , getSuppressed , initCause , printStackTrace , printStackTrace , printStackTrace , setStackTrace , toString
Constructor Detail
ScriptException
public ScriptException(String s)
Creates a ScriptException
with a String to be used in its message.
Filename, and line and column numbers are unspecified.
Parameters:
s
- The String to use in the message.
ScriptException
public ScriptException(String message,
String fileName,
int lineNumber)
Creates a ScriptException
with message, filename and linenumber to
be used in error messages.
Parameters:
message
- The string to use in the message
fileName
- The file or resource name describing the location of a script error
causing the ScriptException
to be thrown.
lineNumber
- A line number describing the location of a script error causing
the ScriptException
to be thrown.
ScriptException
public ScriptException(String message,
String fileName,
int lineNumber,
int columnNumber)
ScriptException
constructor specifying message, filename, line number
and column number.
Parameters:
message
- The message.
fileName
- The filename
lineNumber
- the line number.
columnNumber
- the column number.
JavaScript is disabled on your browser.
Report a bug or suggest an enhancement For further API reference and developer documentation see the Java SE Documentation , which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries. Copyright © 1993, 2024, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA. All rights reserved. Use is subject to license terms and the documentation redistribution policy .
Scripting on this page tracks web page traffic, but does not change the content in any way.