|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.openmdx.base.exception.RuntimeServiceException
public final class RuntimeServiceException
This class wrappes a ServiceException for cases where only RuntimeExceptions but no ServiceExceptions are allowed.
| Constructor Summary | |
|---|---|
RuntimeServiceException(BasicException exception)
Constructor |
|
RuntimeServiceException(Exception exception)
Constructor |
|
RuntimeServiceException(Exception cause,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
Creates a new RuntimeServiceException. |
|
RuntimeServiceException(ServiceException exception)
Rewraps the ServiceException's StackedException |
|
RuntimeServiceException(String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
Creates a new RuntimeServiceException. |
|
| Method Summary | |
|---|---|
RuntimeServiceException |
appendCause(Throwable cause)
|
Throwable |
getCause()
Returns the cause of an exception. |
BasicException |
getCause(String exceptionDomain)
Returns the cause belonging to a specific exception domain. |
int |
getExceptionCode()
Retrieves the exception code of this ServiceException. |
String |
getExceptionDomain()
Retrieves the exception domain of this ServiceException. |
BasicException |
getExceptionStack()
Return a StackedException, this exception object's cause. |
String |
getMessage()
Returns the detail message string of this RuntimeServiceException. |
ServiceException |
getServiceException()
Deprecated. use new |
BasicException |
getStackedException()
Deprecated. use getExceptionStack() |
Throwable |
initCause(Throwable cause)
Initializes the cause of this throwable to the specified value. |
RuntimeServiceException |
log()
Log the exception at warning level. |
void |
printStackTrace(PrintStream s)
|
void |
printStackTrace(PrintWriter s)
|
String |
toString()
A String consisting of the class of this exception, the exception domain, the exception code, the exception description and the exception stack. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RuntimeServiceException(BasicException exception)
exception - the Exception to be wrappedpublic RuntimeServiceException(Exception exception)
exception - the Exception to be wrappedpublic RuntimeServiceException(ServiceException exception)
This constructor could be eliminated in favour of RuntimeServiceException(Exception exception) if recompile was enforced.
exception - The ServiceException to be wrapped
public RuntimeServiceException(Exception cause,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
RuntimeServiceException.
cause - The exception cause.exceptionDomain - The exception domain or null for the
default exception domain containing negative exception codes
only.exceptionCode - The exception code. Negative codes are shared by all exception
domains, while positive ones are (non-default) exception
domain specific.parameters - The exception specific parameters.description - A readable description usually not including the parameters.
public RuntimeServiceException(String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
RuntimeServiceException.
exceptionDomain - The exception domain or null for the
default exception domain containing negative exception codes
only.exceptionCode - The exception code. Negative codes are shared by all exception
domains, while positive ones are (non-default) exception
domain specific.parameters - The exception specific parameters.message - A readable description not including the parameters.| Method Detail |
|---|
public RuntimeServiceException log()
public RuntimeServiceException appendCause(Throwable cause)
public final BasicException getStackedException()
public BasicException getExceptionStack()
getExceptionStack in interface BasicException.Wrapperpublic String getExceptionDomain()
ServiceException.
getExceptionDomain in interface BasicException.Wrapperpublic int getExceptionCode()
ServiceException.
getExceptionCode in interface BasicException.Wrapperpublic BasicException getCause(String exceptionDomain)
getCause in interface BasicException.WrapperexceptionDomain - the desired exception domain,
or null to retrieve the initial cause.
exceptionDomain is
null.public String getMessage()
getMessage in interface BasicException.WrappergetMessage in class Throwablepublic String toString()
toString in class Throwablepublic Throwable initCause(Throwable cause)
initCause in class Throwablecause - the cause (which is saved for later retrieval by the
getCause() method). (A null value is permitted, and indicates
that the cause is nonexistent or unknown.)
IllegalArgumentException - if cause is this throwable.
(A throwable cannot be its own cause.)
IllegalStateException - if the cause is already set.public Throwable getCause()
getCause in class Throwablepublic void printStackTrace(PrintStream s)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter s)
printStackTrace in class Throwablepublic ServiceException getServiceException()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||