public class ContainerException extends java.lang.Exception implements ContainableException
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected ContainerException |
mNestedContainerException
Set if this exception has a nested container exception
|
Constructor and Description |
---|
ContainerException()
Constructs a new ContainerException.
|
ContainerException(java.lang.String pStr)
Constructs a new ContainerException with the given
explanation.
|
ContainerException(java.lang.String pStr,
java.lang.String pErrorCode)
Create an exception with a message and error code
|
ContainerException(java.lang.String pStr,
java.lang.String pErrorCode,
java.lang.Object... pAttributes)
Create an exception with a message, error code, dev message and more info
|
ContainerException(java.lang.String pStr,
java.lang.String pErrorCode,
java.lang.Throwable pSourceException)
Create an exception with a message and error code
|
ContainerException(java.lang.String pStr,
java.lang.Throwable pSourceException)
Constructs a new ContainerException with the given explanation.
|
ContainerException(java.lang.String pStr,
java.lang.Throwable pSourceException,
java.lang.String pErrorCode,
java.lang.Object... pAttributes)
Create an exception with a message, source exception, error code,
dev message and more info.
|
ContainerException(java.lang.Throwable pSourceException)
Constructs a new ContainerException.
|
ContainerException(java.lang.Throwable pSourceException,
java.lang.String pErrorCode)
Throwable exception including an error code.
|
Modifier and Type | Method and Description |
---|---|
protected void |
appendExtraInfo(java.lang.StringBuilder pSb)
Builds up a string for any extra information available, i.e.
|
boolean |
containsInheritableInfo()
Whether or not this exception includes inheritable data, i.e.
|
java.util.Map<java.lang.Object,java.lang.Object> |
getAttributes()
Getter for attributes to associate with the error
Note, if no inheritable fields are set on this exception then any nested container exception will be used instead.
|
java.lang.String |
getErrorCode()
Getter for an error code to associate with this error.
|
java.lang.Object[] |
getMessageArguments()
Return property MessageArguments
|
protected ContainerException |
getNestedContainerException() |
java.lang.Throwable |
getSourceException()
Returns property SourceException
|
void |
printStackTrace(boolean pDisplaySource)
Print our stack trace and optionally that of the source exception
if there is one.
|
void |
printStackTrace(java.io.PrintStream pStream,
boolean pDisplaySource)
Print our stack trace and optionally that of the source exception
if there is one.
|
void |
printStackTrace(java.io.PrintWriter pWriter)
Print our stack trace and that of the source exception if there
is one.
|
void |
printStackTrace(java.io.PrintWriter pWriter,
boolean pDisplaySource)
Print our stack trace and optionally that of the source exception
if there is one.
|
void |
setAttributes(java.lang.Object... pAttributes) |
void |
setErrorCode(java.lang.String pErrorCode)
Setter for an error code to associate with this error.
|
void |
setMessageArguments(java.lang.Object[] pMessageArguments)
Sets the message arguments
|
protected void |
setNestedContainerException(ContainerException pNestedContainerException) |
void |
setSourceException(java.lang.Throwable pSourceException)
Sets property SourceException
|
java.lang.String |
toString()
Display information about this exception and that of the source
exception if there is one.
|
java.lang.String |
toString(boolean pDisplaySource)
Display information about this exception and optionally that of
the source exception if there is one.
|
public static java.lang.String CLASS_VERSION
protected ContainerException mNestedContainerException
public ContainerException()
public ContainerException(java.lang.String pStr)
public ContainerException(java.lang.Throwable pSourceException)
pSourceException
- the initial exception which was the root
cause of the problempublic ContainerException(java.lang.String pStr, java.lang.Throwable pSourceException)
pSourceException
- the initial exception which was the root
cause of the problempublic ContainerException(java.lang.Throwable pSourceException, java.lang.String pErrorCode)
pSourceException
- Throwable of the source exception.pErrorCode
- String of the error code.public ContainerException(java.lang.String pStr, java.lang.String pErrorCode)
pStr
- the error messagepErrorCode
- the error codepublic ContainerException(java.lang.String pStr, java.lang.String pErrorCode, java.lang.Throwable pSourceException)
pStr
- the error messagepErrorCode
- the error codepSourceException
- the source exception, if any.public ContainerException(java.lang.String pStr, java.lang.String pErrorCode, java.lang.Object... pAttributes)
pStr
- the error messagepErrorCode
- the error codepAttributes
- additional attributes to associate with the errorpublic ContainerException(java.lang.String pStr, java.lang.Throwable pSourceException, java.lang.String pErrorCode, java.lang.Object... pAttributes)
pStr
- the error messagepSourceException
- the source exceptionpErrorCode
- the error codepAttributes
- additional attributes to associate with the errorprotected ContainerException getNestedContainerException()
protected void setNestedContainerException(ContainerException pNestedContainerException)
public boolean containsInheritableInfo()
public void setSourceException(java.lang.Throwable pSourceException)
public java.lang.Throwable getSourceException()
getSourceException
in interface ContainableException
public void setMessageArguments(java.lang.Object[] pMessageArguments)
pMessageArguments
- Message arguments to setpublic java.lang.Object[] getMessageArguments()
public java.lang.String getErrorCode()
public void setErrorCode(java.lang.String pErrorCode)
pErrorCode
- error code for this error.public java.util.Map<java.lang.Object,java.lang.Object> getAttributes()
public void setAttributes(java.lang.Object... pAttributes)
public void printStackTrace(boolean pDisplaySource)
pDisplaySource
- if true display the source exception info toopublic void printStackTrace(java.io.PrintStream pStream, boolean pDisplaySource)
pStream
- Stream to print topDisplaySource
- if true display the source exception info toopublic void printStackTrace(java.io.PrintWriter pWriter)
printStackTrace
in class java.lang.Throwable
pWriter
- writer to print topublic void printStackTrace(java.io.PrintWriter pWriter, boolean pDisplaySource)
pWriter
- Writer to print topDisplaySource
- if true display the source exception info toopublic java.lang.String toString()
toString
in class java.lang.Throwable
public java.lang.String toString(boolean pDisplaySource)
pDisplaySource
- if true display the source exception infoprotected void appendExtraInfo(java.lang.StringBuilder pSb)
pSb
- StringBuilder to append to.