public class AbortException
extends java.lang.RuntimeException
catch (AbortException ae) { IMessage m = ae.getMessage(); if (!ae.isPorter()) ae.printStackTrace(System.err); Throwable thrown = ae.getThrown(); if (null != thrown) thrown.printStackTrace(System.err); }
Modifier and Type | Field and Description |
---|---|
protected boolean |
isPorter
true if this is a porter exception - only used to hold message
|
protected IMessage |
message
structured message abort
|
static java.lang.String |
NO_MESSAGE_TEXT
used when message text is null
|
Constructor and Description |
---|
AbortException()
abort with default String message
|
AbortException(IMessage message)
abort with structured message
|
AbortException(java.lang.String s)
abort with message
|
Modifier and Type | Method and Description |
---|---|
static AbortException |
borrowPorter(IMessage message)
Get a porter exception from the pool.
|
IMessage |
getIMessage() |
java.lang.String |
getMessage()
Get message for this AbortException, either associated explicitly as message or implicitly as IMessage message or its thrown
message.
|
java.lang.Throwable |
getThrown() |
boolean |
isPorter()
The stack trace of a porter is invalid; it is only used to carry a message (which may itself have a wrapped exception).
|
boolean |
isSilent() |
void |
printStackTrace() |
void |
printStackTrace(java.io.PrintStream s)
Print the stack trace of any enclosed thrown or this otherwise.
|
void |
printStackTrace(java.io.PrintWriter s)
Print the stack trace of any enclosed thrown or this otherwise.
|
static void |
returnPorter(AbortException porter)
Return (or add) a porter exception to the pool.
|
void |
setIsSilent(boolean isSilent) |
public static final java.lang.String NO_MESSAGE_TEXT
protected IMessage message
protected boolean isPorter
public AbortException()
public AbortException(java.lang.String s)
public AbortException(IMessage message)
public static AbortException borrowPorter(IMessage message)
public static void returnPorter(AbortException porter)
public IMessage getIMessage()
public boolean isPorter()
public java.lang.Throwable getThrown()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
Throwable.getMessage()
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
Throwable.printStackTrace()
public void printStackTrace(java.io.PrintStream s)
printStackTrace
in class java.lang.Throwable
Throwable.printStackTrace(PrintStream)
public void printStackTrace(java.io.PrintWriter s)
printStackTrace
in class java.lang.Throwable
Throwable.printStackTrace(PrintWriter)
public boolean isSilent()
public void setIsSilent(boolean isSilent)