本文整理了Java中org.mozilla.javascript.JavaScriptException.getMessage()
方法的一些代码示例,展示了JavaScriptException.getMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JavaScriptException.getMessage()
方法的具体详情如下:
包路径:org.mozilla.javascript.JavaScriptException
类名称:JavaScriptException
方法名:getMessage
暂无
代码示例来源:origin: pentaho/pentaho-kettle
} catch ( JavaScriptException Signal ) {
Context.reportError( "JavaScriptException while evaluating file \""
+ fileName + "\" (reason: \"" + Signal.getMessage() + "\")" );
} catch ( IOException Signal ) {
Context.reportError( "Error while reading file \""
代码示例来源:origin: org.zkoss.maven/yuicompressor-maven-plugin-zk
} catch (JavaScriptException jse) {
System.err.println("js: " + jse.getMessage());
} catch (IOException ioe) {
System.err.println(ioe.toString());
System.err.println("js: " + ee.getMessage());
} catch (JavaScriptException jse) {
System.err.println("js: " + jse.getMessage());
} catch (IOException ioe) {
System.err.println(ioe.toString());
代码示例来源:origin: iron9light/coffeescript-maven-plugin
public String compile(String coffeeScriptSource) {
Context context = Context.enter();
try {
Scriptable compileScope = context.newObject(globalScope);
compileScope.setParentScope(globalScope);
compileScope.put("coffeeScript", compileScope, coffeeScriptSource);
try {
String options = bare ? "{bare: true}" : "{}";
return (String) context.evaluateString(
compileScope,
String.format("CoffeeScript.compile(coffeeScript, %s);", options),
"source", 0, null);
} catch (JavaScriptException e) {
throw new CoffeeScriptException(e.getMessage());
}
} finally {
Context.exit();
}
}
代码示例来源:origin: com.atlassian.pluginkit/ringojs-kit
private String doCompile(final String coffeeScriptSource) {
Context context = createContext();
try
{
Scriptable compileScope = context.newObject(coffeeScript);
compileScope.setParentScope(coffeeScript);
compileScope.put("coffeeScript", compileScope, coffeeScriptSource);
try
{
String options = bare ? "{bare: true}" : "{}";
return (String) context.evaluateString(
compileScope,
String.format("compile(coffeeScript, %s);", options),
"source", 0, null);
}
catch (JavaScriptException e)
{
throw new CoffeeScriptException(e.getMessage(), e);
}
}
finally
{
Context.exit();
}
}
代码示例来源:origin: cn.dreampie/coffeescript
public String compile(String coffeeScriptSource, String name) throws CoffeeException, IOException {
if (globalScope == null) {
init();
}
long start = System.currentTimeMillis();
options = new Options(optionArgs);
Context context = Context.enter();
try {
Scriptable compileScope = context.newObject(globalScope);
compileScope.setParentScope(globalScope);
compileScope.put("coffeeScriptSource", compileScope, coffeeScriptSource);
try {
String result = (String) context.evaluateString(compileScope, String.format("CoffeeScript.compile(coffeeScriptSource, %s);", options.toJavaScript()),
name, 0, null);
if (logger.isDebugEnabled()) {
logger.debug("Finished compilation of Coffee source in %,d ms.", System.currentTimeMillis() - start);
}
return result;
} catch (JavaScriptException e) {
throw new CoffeeException(e.getMessage());
}
} finally {
Context.exit();
}
}
内容来源于网络,如有侵权,请联系作者删除!