本文整理了Java中org.mozilla.javascript.JavaScriptException.lineNumber()
方法的一些代码示例,展示了JavaScriptException.lineNumber()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JavaScriptException.lineNumber()
方法的具体详情如下:
包路径:org.mozilla.javascript.JavaScriptException
类名称:JavaScriptException
方法名:lineNumber
暂无
代码示例来源:origin: pentaho/pentaho-kettle
retval = false;
} catch ( JavaScriptException e ) {
String position = "(" + e.lineNumber() + ":" + e.columnNumber() + ")";
String message = BaseMessages.getString( PKG, "ScriptDialog.Exception.CouldNotExecuteScript", position );
testException = new KettleException( message, e );
代码示例来源:origin: pentaho/pentaho-kettle
retval = false;
} catch ( JavaScriptException e ) {
String position = "(" + e.lineNumber() + ":" + e.columnNumber() + ")";
String message =
BaseMessages.getString( PKG, "ScriptValuesDialogMod.Exception.CouldNotExecuteScript", position );
代码示例来源:origin: com.github.tntim96/rhino
/**
* @deprecated Use {@link RhinoException#lineNumber()} from the super class.
*/
public int getLineNumber()
{
return lineNumber();
}
代码示例来源:origin: rhino/js
/**
* @deprecated Use {@link RhinoException#lineNumber()} from the super class.
*/
public int getLineNumber()
{
return lineNumber();
}
代码示例来源:origin: io.apigee/rhino
/**
* @deprecated Use {@link RhinoException#lineNumber()} from the super class.
*/
public int getLineNumber()
{
return lineNumber();
}
代码示例来源:origin: ro.isdc.wro4j/rhino
/**
* @deprecated Use {@link RhinoException#lineNumber()} from the super class.
*/
public int getLineNumber()
{
return lineNumber();
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
/**
* @deprecated Use {@link RhinoException#lineNumber()} from the super class.
*/
public int getLineNumber()
{
return lineNumber();
}
代码示例来源:origin: geogebra/geogebra
/**
* @deprecated Use {@link RhinoException#lineNumber()} from the super class.
*/
@Deprecated
public int getLineNumber()
{
return lineNumber();
}
代码示例来源:origin: cat.inspiracio/rhino-js-engine
public Object eval(ScriptContext context) throws ScriptException {
Object result = null;
Context cx = RhinoScriptEngine.enterContext();
try {
Scriptable scope = engine.getRuntimeScope(context);
Object ret = script.exec(cx, scope);
result = engine.unwrapReturnValue(ret);
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
value.toString() :
jse.toString());
throw new ExtendedScriptException(jse, str, jse.sourceName(), line);
} catch (RhinoException re) {
if (DEBUG) re.printStackTrace();
int line = (line = re.lineNumber()) == 0 ? -1 : line;
throw new ExtendedScriptException(re, re.toString(), re.sourceName(), line);
} finally {
Context.exit();
}
return result;
}
代码示例来源:origin: com.google.code.scriptengines/scriptengines-javascript
public Object eval(ScriptContext context) throws ScriptException {
Object result = null;
Context cx = RhinoScriptEngine.enterContext();
try {
Scriptable scope = engine.getRuntimeScope(context);
Object ret = script.exec(cx, scope);
result = engine.unwrapReturnValue(ret);
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
value.toString() :
jse.toString());
throw new ExtendedScriptException(jse, str, jse.sourceName(), line);
} catch (RhinoException re) {
if (DEBUG) re.printStackTrace();
int line = (line = re.lineNumber()) == 0 ? -1 : line;
throw new ExtendedScriptException(re, re.toString(), re.sourceName(), line);
} finally {
Context.exit();
}
return result;
}
代码示例来源:origin: rhq-project/rhq
@Override
public Object eval(ScriptContext context) throws ScriptException {
Object result = null;
Context cx = RhinoScriptEngine.enterContext();
try {
Scriptable scope = engine.getRuntimeScope(context);
Object ret = script.exec(cx, scope);
result = engine.unwrapReturnValue(ret);
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
value.toString() :
jse.toString());
throw new ExtendedScriptException(jse, str, jse.sourceName(), line);
} catch (RhinoException re) {
if (DEBUG) re.printStackTrace();
int line = (line = re.lineNumber()) == 0 ? -1 : line;
throw new ExtendedScriptException(re, re.toString(), re.sourceName(), line);
} finally {
Context.exit();
}
return result;
}
代码示例来源:origin: com.google.code.scriptengines/scriptengines-javascript
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
代码示例来源:origin: rhq-project/rhq
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
代码示例来源:origin: cat.inspiracio/rhino-js-engine
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl
public Location getLocation(Object obj, String description) {
if (obj instanceof EcmaError) {
EcmaError ex = (EcmaError)obj;
if (ex.sourceName() != null) {
return new LocationImpl(ex.getName(), ex.sourceName(), ex.lineNumber(), ex.columnNumber());
} else {
return Location.UNKNOWN;
}
} else if (obj instanceof JavaScriptException) {
JavaScriptException ex = (JavaScriptException)obj;
if (ex.sourceName() != null) {
return new LocationImpl(description, ex.sourceName(), ex.lineNumber(), -1);
} else {
return Location.UNKNOWN;
}
}
return null;
}
};
代码示例来源:origin: com.google.code.scriptengines/scriptengines-javascript
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
代码示例来源:origin: cat.inspiracio/rhino-js-engine
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
代码示例来源:origin: rhq-project/rhq
} catch (JavaScriptException jse) {
if (DEBUG) jse.printStackTrace();
int line = (line = jse.lineNumber()) == 0 ? -1 : line;
Object value = jse.getValue();
String str = (value != null && value.getClass().getName().equals("org.mozilla.javascript.NativeError") ?
代码示例来源:origin: org.apache.sling/org.apache.sling.scripting.javascript
t.sourceName(), t.lineNumber());
内容来源于网络,如有侵权,请联系作者删除!