org.mozilla.javascript

Class EvaluatorException

Known Direct Subclasses:
WrappedException

public class EvaluatorException
extends RuntimeException

The class of exceptions thrown by the JavaScript engine.

Constructor Summary

EvaluatorException(String detail)
Create an exception with the specified detail message.
EvaluatorException(String detail, String sourceName, int lineNumber, String lineSource, int columnNumber)
Create an exception with the specified detail message.

Method Summary

int
getColumnNumber()
The column number of the location of the error, or zero if unknown.
int
getLineNumber()
Returns the line number of the statement causing the error, or zero if not available.
String
getLineSource()
The source of the line causing the error, or zero if unknown.
String
getSourceName()
Get the name of the source containing the error, or null if that information is not available.

Constructor Details

EvaluatorException

public EvaluatorException(String detail)
Create an exception with the specified detail message. Errors internal to the JavaScript engine will simply throw a RuntimeException.

Parameters:
detail - a message with detail about the exception


EvaluatorException

public EvaluatorException(String detail,
                          String sourceName,
                          int lineNumber,
                          String lineSource,
                          int columnNumber)
Create an exception with the specified detail message. Errors internal to the JavaScript engine will simply throw a RuntimeException.

Parameters:
detail - the error message
sourceName - the name of the source reponsible for the error
lineNumber - the line number of the source
lineSource - the source of the line containing the error (may be null if unknown)
columnNumber - the columnNumber of the source (may be zero if unknown)

Method Details

getColumnNumber

public int getColumnNumber()
The column number of the location of the error, or zero if unknown.


getLineNumber

public int getLineNumber()
Returns the line number of the statement causing the error, or zero if not available.


getLineSource

public String getLineSource()
The source of the line causing the error, or zero if unknown.


getSourceName

public String getSourceName()
Get the name of the source containing the error, or null if that information is not available.