org.mozilla.javascript

Class RhinoException

public abstract class RhinoException extends RuntimeException

The class of exceptions thrown by the JavaScript engine.
Method Summary
intcolumnNumber()
The column number of the location of the error, or zero if unknown.
Stringdetails()
StringgetMessage()
voidinitColumnNumber(int columnNumber)
Initialize the column number of the script statement causing the error.
voidinitLineNumber(int lineNumber)
Initialize the line number of the script statement causing the error.
voidinitLineSource(String lineSource)
Initialize the text of the source line containing the error.
voidinitSourceName(String sourceName)
Initialize the uri of the script source containing the error.
intlineNumber()
Returns the line number of the statement causing the error, or zero if not available.
StringlineSource()
The source text of the line causing the error, or null if unknown.
voidprintStackTrace(PrintWriter s)
voidprintStackTrace(PrintStream s)
StringsourceName()
Get the uri of the script source containing the error, or null if that information is not available.

Method Detail

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()

initColumnNumber

public final void initColumnNumber(int columnNumber)
Initialize the column number of the script statement causing the error.

Parameters: columnNumber the column number in the script source. It should be positive number.

Throws: IllegalStateException if the method is called more then once.

initLineNumber

public final void initLineNumber(int lineNumber)
Initialize the line number of the script statement causing the error.

Parameters: lineNumber the line number in the script source. It should be positive number.

Throws: IllegalStateException if the method is called more then once.

initLineSource

public final void initLineSource(String lineSource)
Initialize the text of the source line containing the error.

Parameters: lineSource the text of the source line reponsible for the error. It should not be null.

Throws: IllegalStateException if the method is called more then once.

initSourceName

public final void initSourceName(String sourceName)
Initialize the uri of the script source containing the error.

Parameters: sourceName the uri of the script source reponsible for the error. It should not be null.

Throws: IllegalStateException if the method is called more then once.

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(PrintWriter s)

printStackTrace

public void printStackTrace(PrintStream s)

sourceName

public final String sourceName()
Get the uri of the script source containing the error, or null if that information is not available.