Thrown to indicate a problem with a resource related operation.
Properly displays linked exception (ie. nested exception)
when printing the stack trace.
| Constructor: |
public JBossResourceException(String msg) {
super(msg);
}
Construct a JBossResourceException with the specified detail
message. Parameters:
msg - Detail message.
|
public JBossResourceException(Throwable linked) {
this(linked.getMessage(), linked);
}
Construct a JBossResourceException with the specified
linked Exception. Parameters:
linked - Linked Exception.
|
public JBossResourceException(String msg,
String code) {
super(msg, code);
}
Construct a JBossResourceException with the specified detail
message and error code. Parameters:
msg - Detail message.
code - Error code.
|
public JBossResourceException(String msg,
Throwable linked) {
super(msg);
setLinkedException(process(linked));
}
Construct a JBossResourceException with the specified detail
message and linked Exception. Parameters:
msg - Detail message.
linked - Linked Exception.
|
public JBossResourceException(String msg,
String code,
Throwable linked) {
super(msg, code);
setLinkedException(process(linked));
}
Construct a JBossResourceException with the specified detail
message, error code and linked Exception. Parameters:
msg - Detail message.
code - Error code.
linked - Linked Exception.
|
| Method from org.jboss.resource.JBossResourceException Detail: |
public Throwable getCause() {
return getLinkedException();
}
|
public String getMessage() {
return NestedThrowable.Util.getMessage(super.getMessage(), getLinkedException());
}
Returns the composite throwable message. |
public Throwable getNested() {
return getLinkedException();
}
Return the nested Throwable. |
public void printStackTrace() {
printStackTrace(System.err);
}
Prints the composite message and the embedded stack trace to
System.err. |
public void printStackTrace(PrintStream stream) {
Exception linked = getLinkedException();
if (linked == null || NestedThrowable.PARENT_TRACE_ENABLED)
{
super.printStackTrace(stream);
}
NestedThrowable.Util.print(linked, stream);
}
Prints the composite message and the embedded stack trace to the
specified print stream. |
public void printStackTrace(PrintWriter writer) {
Exception linked = getLinkedException();
if (linked == null || NestedThrowable.PARENT_TRACE_ENABLED)
{
super.printStackTrace(writer);
}
NestedThrowable.Util.print(linked, writer);
}
Prints the composite message and the embedded stack trace to the
specified print writer. |
public static void rethrowAsResourceException(String message,
Throwable t) throws ResourceException {
if (t instanceof ResourceException)
throw (ResourceException) t;
else
throw new JBossResourceException(message, t);
}
Rethrow as a resource exception if it is not already |