/** * @deprecated Use {@link #getWrappedException()} instead. */ public Object unwrap() { return getWrappedException(); }
/** * @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); } // fix up the stack trace of chained exceptions for(Throwable t=getCause(); t!=null; t=t.getCause()) overwriteStackTrace(t); }
final WrappedException wrappedException = (WrappedException) getCause(); printWriter.print("WrappedException: "); wrappedException.printStackTrace(printWriter); final Throwable innerException = wrappedException.getWrappedException(); if (innerException == null) { printWriter.println("Inside wrapped exception: null");
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); } }
throw (RhinoException)e; throw new WrappedException(e);
final WrappedException wrappedException = (WrappedException) getCause(); printWriter.print("WrappedException: "); wrappedException.printStackTrace(printWriter); final Throwable innerException = wrappedException.getWrappedException(); if (innerException == null) { printWriter.println("Inside wrapped exception: null");
re = new WrappedException(t); errorName = "JavaException"; errorMsg = t.toString();
final WrappedException wrappedException = (WrappedException) getCause(); printWriter.print("WrappedException: "); wrappedException.printStackTrace(printWriter); final Throwable innerException = wrappedException.getWrappedException(); if (innerException == null) { printWriter.println("Inside wrapped exception: null");
final WrappedException wrappedException = (WrappedException) getCause(); printWriter.print("WrappedException: "); wrappedException.printStackTrace(printWriter); final Throwable innerException = wrappedException.getWrappedException(); if (innerException == null) { printWriter.println("Inside wrapped exception: null");
final WrappedException wrappedException = (WrappedException) getCause(); printWriter.print("WrappedException: "); wrappedException.printStackTrace(printWriter); final Throwable innerException = wrappedException.getWrappedException(); if (innerException == null) { printWriter.println("Inside wrapped exception: null");