/**
* Get the line number for a {@code ScriptObject} representing an error
*
* @param errObj the error object
* @return the line number, or undefined if wrapped exception is not a ParserException
*/
public static Object getLineNumber(final ScriptObject errObj) {
final Object e = getException(errObj);
if (e instanceof NashornException) {
return ((NashornException)e).getLineNumber();
} else if (e instanceof ScriptException) {
return ((ScriptException)e).getLineNumber();
}
return UNDEFINED;
}
ECMAException.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:OpenJSharp
作者:
评论列表
文章目录