@Exported public abstract class NashornException extends RuntimeException
| Modifier | Constructor and Description |
|---|---|
protected |
NashornException(String msg,
String fileName,
int line,
int column)
Constructor
|
protected |
NashornException(String msg,
Throwable cause)
Constructor
|
protected |
NashornException(String msg,
Throwable cause,
String fileName,
int line,
int column)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getColumnNumber()
Get the column for this
NashornException |
Object |
getEcmaError()
Return the underlying ECMA error object, if available.
|
String |
getFileName()
Get the source file name for this
NashornException |
int |
getLineNumber()
Get the line number for this
NashornException |
static StackTraceElement[] |
getScriptFrames(Throwable exception)
Returns array javascript stack frames from the given exception object.
|
static String |
getScriptStackString(Throwable exception)
Return a formatted script stack trace string with frames information separated by '\n'
|
protected Object |
getThrown()
Get the thrown object.
|
protected NashornException |
initEcmaError(jdk.nashorn.internal.runtime.ScriptObject global)
Initialization function for ECMA errors.
|
void |
setColumnNumber(int column)
Set the column for this
NashornException |
void |
setEcmaError(Object ecmaError)
Return the underlying ECMA error object, if available.
|
void |
setFileName(String fileName)
Set the source file name for this
NashornException |
void |
setLineNumber(int line)
Set the line number for this
NashornException |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected NashornException(String msg, String fileName, int line, int column)
msg - exception messagefileName - file nameline - line numbercolumn - column numberprotected NashornException(String msg, Throwable cause, String fileName, int line, int column)
msg - exception messagecause - exception causefileName - file nameline - line numbercolumn - column numberpublic final String getFileName()
NashornExceptionpublic final void setFileName(String fileName)
NashornExceptionfileName - the file namepublic final int getLineNumber()
NashornExceptionpublic final void setLineNumber(int line)
NashornExceptionline - the line numberpublic final int getColumnNumber()
NashornExceptionpublic final void setColumnNumber(int column)
NashornExceptioncolumn - the column numberpublic static StackTraceElement[] getScriptFrames(Throwable exception)
exception - exception from which stack frames are retrieved and filteredpublic static String getScriptStackString(Throwable exception)
exception - exception for which script stack string is returnedprotected Object getThrown()
protected NashornException initEcmaError(jdk.nashorn.internal.runtime.ScriptObject global)
global - the globalpublic Object getEcmaError()
public void setEcmaError(Object ecmaError)
ecmaError - underlying ECMA Error object's mirror or whatever was thrown
from script such as a String, Number or a Boolean.
Copyright © 2014, 2016, Oracle and/or its affiliates. All rights reserved.