|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--org.arch4j.core.BaseApplicationException
This class is the root of the Arch4J exception tree for exceptions that are to be treated as application exceptions. Application exceptions thrown should be handled by business logic.
Additionally, in an EJB (Enterprise Java Beans) context, an application exception will not automatically force the EJB container to roll back a transaction. It is up to the intervening business layers to decide that.
This class is similar to a RemoteException
,
in that it can hold a nested, wrapped exception.
Field Summary | |
protected Throwable |
nestedException
The nested, wrapped exception. |
Constructor Summary | |
BaseApplicationException()
Constructs a BaseApplicationException with no specified
detail message or nested exception. |
|
BaseApplicationException(String message)
Constructs a BaseApplicationException with the specified
detail message. |
|
BaseApplicationException(String message,
Throwable exception)
Constructs a BaseApplicationException with the specified
detail message and nested exception. |
|
BaseApplicationException(Throwable exception)
Constructs a BaseApplicationException with the specified
nested exception. |
Method Summary | |
String |
getMessage()
Returns the detail message, including the message from the nested exception if there is one. |
Throwable |
getNestedException()
|
String |
getStackTraceString()
|
void |
printStackTrace()
Prints the composite message to System.err . |
void |
printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream. |
void |
printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Throwable nestedException
Constructor Detail |
public BaseApplicationException()
BaseApplicationException
with no specified
detail message or nested exception.
public BaseApplicationException(String message)
BaseApplicationException
with the specified
detail message.
message
- The detailed message.public BaseApplicationException(Throwable exception)
BaseApplicationException
with the specified
nested exception.
exception
- The nested exception.public BaseApplicationException(String message, Throwable exception)
BaseApplicationException
with the specified
detail message and nested exception.
message
- The detailed message.exception
- The nested exception.Method Detail |
public String getMessage()
getMessage
in class Throwable
public void printStackTrace(PrintStream ps)
printStackTrace
in class Throwable
ps
- The print stream.public void printStackTrace()
System.err
.
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter pw)
printStackTrace
in class Throwable
pw
- The print writer.public Throwable getNestedException()
getNestedException
in interface BaseException
public String getStackTraceString()
getStackTraceString
in interface BaseException
String
.
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |