|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.buildforge.services.common.ServiceException
public class ServiceException
Generic, internationalized exception class for the services layer.
Nested Class Summary | |
---|---|
class |
ServiceException.WrappedServiceException
This is a simple wrapping class that allows a ServiceException to be thrown as an unchecked exception. |
Field Summary | |
---|---|
static java.lang.Class<ServiceException> |
CLASS
Resolve the class |
Constructor Summary | |
---|---|
ServiceException(MessageDBO msg)
Construct a new ServiceException from a pre-built message. |
|
ServiceException(MessageDBO msg,
java.lang.Throwable cause)
Construct a new ServiceException from a pre-built message. |
|
ServiceException(java.lang.String id)
Construct a new ServiceException. |
|
ServiceException(java.lang.String id,
int arg)
Construct a new ServiceException. |
|
ServiceException(java.lang.String id,
int arg,
java.lang.Throwable cause)
Construct a new ServiceException. |
|
ServiceException(java.lang.String id,
java.lang.String arg)
Construct a new ServiceException. |
|
ServiceException(java.lang.String id,
java.lang.String[] args)
Construct a new ServiceException. |
|
ServiceException(java.lang.String id,
java.lang.String[] args,
java.lang.Throwable cause)
Construct a new ServiceException |
|
ServiceException(java.lang.String id,
java.lang.String arg,
java.lang.Throwable cause)
Construct a new ServiceException. |
|
ServiceException(java.lang.String id,
java.lang.Throwable cause)
Construct a new ServiceException. |
Method Summary | |
---|---|
java.lang.String |
getMessage()
|
java.lang.String |
getMessageKey()
Gets the error id used when constructing this exception. |
MessageDBO |
getMessageObject()
Returns the message object that was created to represent this exception's message text. |
ServiceException.WrappedServiceException |
wrap()
Wraps this exception so that it can be propogated as an unchecked exception. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Class<ServiceException> CLASS
Constructor Detail |
---|
public ServiceException(MessageDBO msg)
msg
- the internationalized error message
java.lang.NullPointerException
- if msg is nullpublic ServiceException(MessageDBO msg, java.lang.Throwable cause)
msg
- the internationalized error messagecause
- an exception that caused this exception to occur
java.lang.NullPointerException
- if msg is nullpublic ServiceException(java.lang.String id)
id
- a unique error id for a translatable messagepublic ServiceException(java.lang.String id, java.lang.String[] args)
id
- a unique error id for a translatable messageargs
- arguments for the translationpublic ServiceException(java.lang.String id, int arg)
id
- a unique error id for a translatable messagearg
- a single argument for the translationpublic ServiceException(java.lang.String id, java.lang.String arg)
id
- a unique error id for a translatable messagearg
- a single argument for the translationpublic ServiceException(java.lang.String id, java.lang.Throwable cause)
id
- a unique error id for a translatable messagecause
- the exception to use when initializing the causepublic ServiceException(java.lang.String id, java.lang.String[] args, java.lang.Throwable cause)
id
- the unique id of the internationalized message to useargs
- arguments for the translationcause
- the exception to use when initializing the causepublic ServiceException(java.lang.String id, int arg, java.lang.Throwable cause)
id
- a unique error id for a translatable messagearg
- a single argument for the translationcause
- the exception to use when initializing the causepublic ServiceException(java.lang.String id, java.lang.String arg, java.lang.Throwable cause)
id
- a unique error id for a translatable messagearg
- a single argument for the translationcause
- the exception to use when initializing the causeMethod Detail |
---|
public java.lang.String getMessageKey()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public MessageDBO getMessageObject()
public ServiceException.WrappedServiceException wrap()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |