public class ScriptException extends RuntimeException
Constructor and Description |
---|
ScriptException(HtmlPage page,
Throwable throwable)
Creates an instance.
|
ScriptException(HtmlPage page,
Throwable throwable,
String scriptSourceCode)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getFailingColumnNumber()
Returns the column number of the source that was executing at the time of the exception.
|
String |
getFailingLine()
Returns the line of source that was being executed when this exception was
thrown.
|
int |
getFailingLineNumber()
Returns the line number of the source that was executing at the time of the exception.
|
HtmlPage |
getPage()
Gets the HTML page in which the script error occurred.
|
String |
getScriptSourceCode()
Returns the source code line that failed.
|
void |
printScriptStackTrace(PrintWriter writer)
Prints the script stack trace.
|
void |
printStackTrace()
Prints the stack trace to System.out.
|
void |
printStackTrace(PrintStream stream)
Prints the stack trace.
|
void |
printStackTrace(PrintWriter writer)
Prints the stack trace.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public ScriptException(HtmlPage page, Throwable throwable, String scriptSourceCode)
page
- the page in which the script causing this exception was executedthrowable
- the exception that was thrown from the script enginescriptSourceCode
- the code that was being executed when this exception
was thrown. This may be null if the exception was not caused by execution
of JavaScript.public void printStackTrace()
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter writer)
printStackTrace
in class Throwable
writer
- Where the stack trace will be writtenpublic void printStackTrace(PrintStream stream)
printStackTrace
in class Throwable
stream
- Where the stack trace will be writtenpublic String getScriptSourceCode()
public String getFailingLine()
public int getFailingLineNumber()
public int getFailingColumnNumber()
public HtmlPage getPage()
public void printScriptStackTrace(PrintWriter writer)
writer
- where the stack trace will be writtenCopyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.