|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.openmdx.base.exception.ServiceException
public final class ServiceException
| Constructor Summary | |
|---|---|
ServiceException(BasicException exception)
Constructor |
|
ServiceException(Exception exception)
Constructor |
|
ServiceException(Exception cause,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
Creates a new ServiceException. |
|
ServiceException(String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
Creates a new ServiceException. |
|
| Method Summary | |
|---|---|
ServiceException |
appendCause(Throwable cause)
|
Throwable |
getCause()
Returns the cause of an exception. |
BasicException |
getCause(String exceptionDomain)
Returns the cause belonging to a specific exception domain. |
String |
getClassName()
Deprecated. use @{link ServiceException#getStackedException()} followed by |
String |
getDescription()
Deprecated. use @{link ServiceException#getStackedException()} followed by |
String |
getDomain()
Deprecated. use @{link ServiceException#getExceptionDomain()}. |
int |
getErrorCode()
Deprecated. use @{link ServiceException#getStackedException()} followed by |
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. |
int |
getLineNr()
Deprecated. use @{link ServiceException#getStackedException()} followed by |
String |
getMessage()
Returns the detail message string of this RuntimeServiceException. |
String |
getMethodName()
Deprecated. use @{link ServiceException#getStackedException()} followed by |
BasicException.Parameter[] |
getParameters()
Deprecated. use @{link ServiceException#getStackedException()} followed by |
BasicException |
getStackedException()
Deprecated. use getExceptionStack() |
BasicException |
getStackedException(int index)
Deprecated. use @{link ServiceException#getStackedException()} followed by |
Date |
getTimestamp()
Deprecated. use @{link ServiceException#getStackedException()} followed by |
Throwable |
initCause(Throwable cause)
Initializes the cause of this throwable to the specified value. |
ServiceException |
log()
Log the exception. |
void |
printStackTrace(PrintStream s)
|
void |
printStackTrace(PrintWriter s)
|
String |
stackToString()
Deprecated. use @{link ServiceException#toString()}. |
static ServiceException |
toServiceException(Exception exception)
Deprecated. use new ServiceException(Exception) |
String |
toString()
A String consisting of the class of this exception, the exception domain, the exception code, the exception description and the exception stack. |
String |
toString(String format)
Returns a string representation for the exception's top level object using formatting information. |
| 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 ServiceException(BasicException exception)
exception - the Exception to be wrappedpublic ServiceException(Exception exception)
exception - the Exception to be wrapped
public ServiceException(Exception cause,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
ServiceException.
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 ServiceException(String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
ServiceException.
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 ServiceException log()
public ServiceException 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 String stackToString()
public BasicException getStackedException(int index)
public String getClassName()
ServiceExceptionDescriptor object.
public String getMethodName()
ServiceExceptionDescriptor object.
public int getLineNr()
ServiceExceptionDescriptor object.
public String getDomain()
ServiceException toplevel object.
public int getErrorCode()
ServiceException toplevel object.
public Date getTimestamp()
ServiceException toplevel object.
public BasicException.Parameter[] getParameters()
ServiceException toplevel object.
public String getDescription()
ServiceException toplevel object.
public String toString(String format)
Defined placeholders for exception properties: Any exception property name is a valid placeholder. Multivalue properties are rendered like arrays ("[value1,value2, ...]") Defined placeholders for exception parameters: EX_TIMESTAMP the exception's timestamp as "yyyy-MM-dd HH:mm:ss.SSS" EX_CLASS the exception's class name EX_METHOD the exception's method name EX_LINE the exception's line number EX_DOMAIN the exception's domain EX_ERRORCODE the exception's error code EX_DESCRIPTION the exception's description
format - a format string
public void printStackTrace(PrintStream s)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter s)
printStackTrace in class Throwablepublic static ServiceException toServiceException(Exception exception)
throwable - a throwable to be mapped to a ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||