org.mozilla.javascript
Class RhinoException
RuntimeException
org.mozilla.javascript.RhinoException
public abstract class RhinoException
extends RuntimeException
The class of exceptions thrown by the JavaScript engine.
int | columnNumber() - The column number of the location of the error, or zero if unknown.
|
String | details()
|
String | getMessage()
|
String | getScriptStackTrace() - Get a string representing the script stack of this exception.
|
String | getScriptStackTrace(FilenameFilter filter) - Get a string representing the script stack of this exception.
|
void | initColumnNumber(int columnNumber) - Initialize the column number of the script statement causing the error.
|
void | initLineNumber(int lineNumber) - Initialize the line number of the script statement causing the error.
|
void | initLineSource(String lineSource) - Initialize the text of the source line containing the error.
|
void | initSourceName(String sourceName) - Initialize the uri of the script source containing the error.
|
int | lineNumber() - Returns the line number of the statement causing the error,
or zero if not available.
|
String | lineSource() - The source text of the line causing the error, or null if unknown.
|
void | printStackTrace(PrintStream s)
|
void | printStackTrace(PrintWriter s)
|
String | sourceName() - Get the uri of the script source containing the error, or null
if that information is not available.
|
columnNumber
public final int columnNumber()
The column number of the location of the error, or zero if unknown.
details
public String details()
getMessage
public final String getMessage()
getScriptStackTrace
public String getScriptStackTrace()
Get a string representing the script stack of this exception.
If optimization is enabled, this corresponds to all java stack elements
with a source name ending with ".js".
getScriptStackTrace
public String getScriptStackTrace(FilenameFilter filter)
Get a string representing the script stack of this exception.
If optimization is enabled, this corresponds to all java stack elements
with a source name matching the filter
.
filter
- the file name filter to determine whether a file is a
script file
initColumnNumber
public final void initColumnNumber(int columnNumber)
Initialize the column number of the script statement causing the error.
columnNumber
- the column number in the script source.
It should be positive number.
initLineNumber
public final void initLineNumber(int lineNumber)
Initialize the line number of the script statement causing the error.
lineNumber
- the line number in the script source.
It should be positive number.
initLineSource
public final void initLineSource(String lineSource)
Initialize the text of the source line containing the error.
lineSource
- the text of the source line reponsible for the error.
It should not be null.
initSourceName
public final void initSourceName(String sourceName)
Initialize the uri of the script source containing the error.
sourceName
- the uri of the script source reponsible for the error.
It should not be null.
lineNumber
public final int lineNumber()
Returns the line number of the statement causing the error,
or zero if not available.
lineSource
public final String lineSource()
The source text of the line causing the error, or null if unknown.
printStackTrace
public void printStackTrace(PrintStream s)
printStackTrace
public void printStackTrace(PrintWriter s)
sourceName
public final String sourceName()
Get the uri of the script source containing the error, or null
if that information is not available.