本文整理了Java中org.mozilla.javascript.WrappedException
类的一些代码示例,展示了WrappedException
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WrappedException
类的具体详情如下:
包路径:org.mozilla.javascript.WrappedException
类名称:WrappedException
[英]A wrapper for runtime exceptions. Used by the JavaScript runtime to wrap and propagate exceptions that occur during runtime.
[中]运行时异常的包装器。JavaScript运行时用于包装和传播运行时发生的异常。
代码示例来源:origin: io.apigee/rhino
/**
* @deprecated Use {@link #getWrappedException()} instead.
*/
public Object unwrap()
{
return getWrappedException();
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
throw (RhinoException)e;
throw new WrappedException(e);
代码示例来源:origin: rhino/js
/**
* @see Context#throwAsScriptRuntimeEx(Throwable e)
*/
public WrappedException(Throwable exception)
{
super("Wrapped "+exception.toString());
this.exception = exception;
Kit.initCause(this, exception);
int[] linep = { 0 };
String sourceName = Context.getSourcePositionFromStack(linep);
int lineNumber = linep[0];
if (sourceName != null) {
initSourceName(sourceName);
}
if (lineNumber != 0) {
initLineNumber(lineNumber);
}
}
代码示例来源:origin: io.apigee/rhino
WrappedException we = (WrappedException)t;
re = we;
javaException = we.getWrappedException();
errorName = "JavaException";
errorMsg = javaException.getClass().getName()
re = new WrappedException(t);
errorName = "JavaException";
errorMsg = t.toString();
代码示例来源:origin: org.zkoss.maven/yuicompressor-maven-plugin-zk
System.err.println(we.getWrappedException().toString());
we.printStackTrace();
} catch (EvaluatorException ee) {
System.err.println(we.getWrappedException().toString());
we.printStackTrace();
} catch (EvaluatorException ee) {
System.err.println("js: " + ee.getMessage());
代码示例来源:origin: org.wso2.bpel.extensions/ode-bpel-extensions-e4x
} catch (WrappedException e) {
__logger.warn("Error during JS execution.", e);
if (e.getWrappedException() instanceof FaultException) {
throw (FaultException)e.getWrappedException();
throw new FaultException(new QName("ExtensionEvaluationFault", JSExtensionBundle.NS), e.getMessage());
} catch (FaultException e) {
__logger.warn("Fault during JS execution.", e);
代码示例来源:origin: com.github.tntim96/rhino
public void reportException(RhinoException ex)
{
if (ex instanceof WrappedException) {
WrappedException we = (WrappedException)ex;
we.printStackTrace(err);
} else {
String lineSeparator =
SecurityUtilities.getSystemProperty("line.separator");
String msg = getExceptionMessage(ex) + lineSeparator +
ex.getScriptStackTrace();
reportErrorMessage(msg, ex.sourceName(), ex.lineNumber(),
ex.lineSource(), ex.columnNumber(), false);
}
}
代码示例来源:origin: com.github.tntim96/rhino
WrappedException we = (WrappedException)t;
re = we;
javaException = we.getWrappedException();
errorName = "JavaException";
errorMsg = javaException.getClass().getName()
re = new WrappedException(t);
errorName = "JavaException";
errorMsg = t.toString();
代码示例来源:origin: ro.isdc.wro4j/rhino
public void reportException(RhinoException ex)
{
if (ex instanceof WrappedException) {
WrappedException we = (WrappedException)ex;
we.printStackTrace(err);
} else {
String lineSeparator =
SecurityUtilities.getSystemProperty("line.separator");
String msg = getExceptionMessage(ex) + lineSeparator +
ex.getScriptStackTrace();
reportErrorMessage(msg, ex.sourceName(), ex.lineNumber(),
ex.lineSource(), ex.columnNumber(), false);
}
}
代码示例来源:origin: rhino/js
/**
* @deprecated Use {@link #getWrappedException()} instead.
*/
public Object unwrap()
{
return getWrappedException();
}
代码示例来源:origin: geogebra/geogebra
WrappedException we = (WrappedException)t;
re = we;
javaException = we.getWrappedException();
errorName = "JavaException";
errorMsg = javaException.getClass().getName()
re = new WrappedException(t);
errorName = "JavaException";
errorMsg = t.toString();
代码示例来源:origin: org.apache.xmlgraphics/batik-bridge
public Object run(Context cx) {
try {
return cx.evaluateReader(globalObject,
scriptReader,
description,
1, rhinoClassLoader);
} catch (IOException ioe) {
throw new WrappedException(ioe);
}
}
};
代码示例来源:origin: com.github.tntim96/rhino
/**
* @see Context#throwAsScriptRuntimeEx(Throwable e)
*/
public WrappedException(Throwable exception)
{
super("Wrapped "+exception.toString());
this.exception = exception;
Kit.initCause(this, exception);
int[] linep = { 0 };
String sourceName = Context.getSourcePositionFromStack(linep);
int lineNumber = linep[0];
if (sourceName != null) {
initSourceName(sourceName);
}
if (lineNumber != 0) {
initLineNumber(lineNumber);
}
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
/**
* @deprecated Use {@link #getWrappedException()} instead.
*/
public Object unwrap()
{
return getWrappedException();
}
代码示例来源:origin: ro.isdc.wro4j/rhino
WrappedException we = (WrappedException)t;
re = we;
javaException = we.getWrappedException();
errorName = "JavaException";
errorMsg = javaException.getClass().getName()
re = new WrappedException(t);
errorName = "JavaException";
errorMsg = t.toString();
代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik
public Object run(Context cx) {
try {
return cx.evaluateReader(globalObject,
scriptReader,
description,
1, rhinoClassLoader);
} catch (IOException ioe) {
throw new WrappedException(ioe);
}
}
};
代码示例来源:origin: geogebra/geogebra
/**
* @see Context#throwAsScriptRuntimeEx(Throwable e)
*/
public WrappedException(Throwable exception)
{
super("Wrapped "+exception.toString());
this.exception = exception;
Kit.initCause(this, exception);
int[] linep = { 0 };
String sourceName = Context.getSourcePositionFromStack(linep);
int lineNumber = linep[0];
if (sourceName != null) {
initSourceName(sourceName);
}
if (lineNumber != 0) {
initLineNumber(lineNumber);
}
}
代码示例来源:origin: com.github.tntim96/rhino
/**
* @deprecated Use {@link #getWrappedException()} instead.
*/
public Object unwrap()
{
return getWrappedException();
}
代码示例来源:origin: rhino/js
WrappedException we = (WrappedException)t;
re = we;
javaException = we.getWrappedException();
errorName = "JavaException";
errorMsg = javaException.getClass().getName()
re = new WrappedException(t);
errorName = "JavaException";
errorMsg = t.toString();
代码示例来源:origin: apache/batik
public Object run(Context cx) {
try {
return cx.evaluateReader(globalObject,
scriptReader,
description,
1, rhinoClassLoader);
} catch (IOException ioe) {
throw new WrappedException(ioe);
}
}
};
内容来源于网络,如有侵权,请联系作者删除!