/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* JAXB-bound bean that captures the exception and its call stack.
*
* <p>
* This is used to capture the stack trace of the server side error and
* send that over to the client.
*
* @author Kohsuke Kawaguchi
*/
final class ExceptionBean {
/**
* Converts the given {@link Throwable} into an XML representation
* and put that as a DOM tree under the given node.
*/
}
/**
* Does the reverse operation of {@link #marshal(Throwable, Node)}. Constructs an
* {@link Exception} object from the XML.
*/
return e.toException();
}
// so that people noticed this fragment can turn it off
public String note = "To disable this feature, set "+SOAPFaultBuilder.CAPTURE_STACK_TRACE_PROPERTY+" system property to false";
}
/**
* Creates an {@link ExceptionBean} tree that represents the given {@link Throwable}.
*/
this.message = t.getMessage();
for (StackTraceElement f : t.getStackTrace()) {
}
}
if(stackTrace!=null) {
e.setStackTrace(ste);
}
return e;
}
/**
* Captures one stack frame.
*/
static final class StackFrame {
}
}
if(i==-2) return "native";
return "unknown";
}
try {
} catch (NumberFormatException e) {
return -1;
}
}
}
}
/**
* Checks if the given element is the XML representation of {@link ExceptionBean}.
*/
}
/**
* Namespace URI.
*/
static {
try {
} catch (JAXBException e) {
// this must be a bug in our code
throw new Error(e);
}
}
return suggestion;
}
};
}