| |
|
| java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException com.gargoylesoftware.htmlunit.ScriptException
ScriptException | public class ScriptException extends RuntimeException (Code) | | An exception that will be thrown if an error occurs during the processing of
a script.
version: $Revision: 2132 $ author: Mike Bowler author: Marc Guillemot |
Constructor Summary | |
public | ScriptException(HtmlPage page, Throwable throwable, String scriptSourceCode) Creates an instance.
Parameters: page - the page in which the script causing this exception was executed Parameters: throwable - The exception that was thrown from the script engine. Parameters: scriptSourceCode - The code that was being executed when this exceptionwas thrown. | public | ScriptException(HtmlPage page, Throwable throwable) |
ScriptException | public ScriptException(HtmlPage page, Throwable throwable, String scriptSourceCode)(Code) | | Creates an instance.
Parameters: page - the page in which the script causing this exception was executed Parameters: throwable - The exception that was thrown from the script engine. Parameters: scriptSourceCode - The code that was being executed when this exceptionwas thrown. This may be null if the exception was not caused by executionof javascript. |
ScriptException | public ScriptException(HtmlPage page, Throwable throwable)(Code) | | Create an instance
Parameters: page - the page in which the script causing this exception was executed Parameters: throwable - The exception that was thrown from the script engine. |
getFailingLine | public String getFailingLine()(Code) | | Return the line of source that was being executed when this exception was
thrown.
The line of source or an empty string if the exception was not throwndue to the execution of a script. |
getFailingLineNumber | public int getFailingLineNumber()(Code) | | Return the line number of the source that was executing at the time of the
exception.
The line number or -1 if the exception was not thrown due to theexecution of a script. |
getPage | public HtmlPage getPage()(Code) | | 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.
the page |
getScriptSourceCode | public String getScriptSourceCode()(Code) | | Return the source code line that failed
the source code line that failed |
printScriptStackTrace | public void printScriptStackTrace(PrintWriter writer)(Code) | | Print the script stack trace.
This represents only the script calls.
Parameters: writer - where the stack trace will be written |
printStackTrace | public void printStackTrace()(Code) | | Print the stack trace to System.out. If this exception contains another
exception then the stack traces for both will be printed.
|
printStackTrace | public void printStackTrace(PrintWriter writer)(Code) | | Print the stack trace. If this exception contains another exception then
the stack traces for both will be printed.
Parameters: writer - Where the stack trace will be written |
printStackTrace | public void printStackTrace(PrintStream stream)(Code) | | Print the stack trace. If this exception contains another exception then
the stack traces for both will be printed.
Parameters: stream - Where the stack trace will be written |
|
|
|