|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.gargoylesoftware.htmlunit.ScriptException
public class ScriptException
An exception that will be thrown if an error occurs during the processing of a script.
Constructor Summary | |
---|---|
ScriptException(HtmlPage page,
java.lang.Throwable throwable)
Create an instance |
|
ScriptException(HtmlPage page,
java.lang.Throwable throwable,
java.lang.String scriptSourceCode)
Creates an instance. |
Method Summary | |
---|---|
java.lang.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. |
java.lang.String |
getScriptSourceCode()
Return the source code line that failed |
void |
printScriptStackTrace(java.io.PrintWriter writer)
Print the script stack trace. |
void |
printStackTrace()
Print the stack trace to System.out. |
void |
printStackTrace(java.io.PrintStream stream)
Print the stack trace. |
void |
printStackTrace(java.io.PrintWriter writer)
Print the stack trace. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScriptException(HtmlPage page, java.lang.Throwable throwable)
page
- the page in which the script causing this exception was executedthrowable
- The exception that was thrown from the script engine.public ScriptException(HtmlPage page, java.lang.Throwable throwable, java.lang.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.Method Detail |
---|
public java.lang.String getFailingLine()
public int getFailingLineNumber()
public HtmlPage getPage()
public java.lang.String getScriptSourceCode()
public void printScriptStackTrace(java.io.PrintWriter writer)
writer
- where the stack trace will be writtenpublic void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream stream)
printStackTrace
in class java.lang.Throwable
stream
- Where the stack trace will be writtenpublic void printStackTrace(java.io.PrintWriter writer)
printStackTrace
in class java.lang.Throwable
writer
- Where the stack trace will be written
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |