public class ScriptException extends RuntimeException
Constructor and Description |
---|
ScriptException(HtmlPage page,
Throwable throwable)
Create an instance
|
ScriptException(HtmlPage page,
Throwable throwable,
String scriptSourceCode)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getFailingLine()
Return the line of source that was being executed when this exception was
thrown.
|
int |
getFailingLineNumber()
Return 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.
Caution: this page may be only partially parsed if the exception occurred in a script executed at parsing time. |
String |
getScriptSourceCode()
Return the source code line that failed
|
void |
printScriptStackTrace(PrintWriter writer)
Print the script stack trace.
|
void |
printStackTrace()
Print the stack trace to System.out.
|
void |
printStackTrace(PrintStream stream)
Print the stack trace.
|
void |
printStackTrace(PrintWriter writer)
Print 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 engine.scriptSourceCode
- 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 HtmlPage getPage()
public void printScriptStackTrace(PrintWriter writer)
writer
- where the stack trace will be writtenCopyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.