|
||||||||||
| 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.apache.maven.plugin.AbstractMojoExecutionException
org.apache.maven.plugin.MojoExecutionException
org.codehaus.mojo.exception.CodedException
public abstract class CodedException
| Field Summary | |
|---|---|
protected Error |
error
The error code for the specific error. |
protected java.lang.String[] |
errorFields
Any fields which would need to be filled in within the error message. |
protected java.util.ResourceBundle |
errors
The shadow handle to the resource bundle. |
protected static Error |
MISSING_ERROR_KEY
The error message used when a key is missing from the resource bundles. |
| Fields inherited from class org.apache.maven.plugin.AbstractMojoExecutionException |
|---|
longMessage, source |
| Constructor Summary | |
|---|---|
CodedException()
Empty Constructor. |
|
CodedException(Error code)
An exception with a specific error code. |
|
CodedException(Error code,
java.lang.String field)
An exception with an error code and fields in the message. |
|
CodedException(Error code,
java.lang.String[] fields)
An exception with an error code and fields in the message. |
|
CodedException(Error code,
java.lang.String[] fields,
java.lang.Throwable exception)
Creates a coded exception with fields and a root cause. |
|
CodedException(Error code,
java.lang.String field,
java.lang.Throwable exception)
Creates a coded exception with fields and a root cause. |
|
CodedException(Error code,
java.lang.Throwable exception)
Creates a new Coded Exception, given an error code and root cause. |
|
| Method Summary | |
|---|---|
java.lang.String |
getMessage()
getMessage - Check the error code to see if
it's an ExtendedError. |
protected void |
init(Error code,
java.lang.String[] fields)
Initialize the instance. |
| Methods inherited from class org.apache.maven.plugin.AbstractMojoExecutionException |
|---|
getLongMessage, getSource |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final Error MISSING_ERROR_KEY
protected Error error
protected java.lang.String[] errorFields
protected java.util.ResourceBundle errors
| Constructor Detail |
|---|
public CodedException()
public CodedException(Error code)
code - The code key used to look up the error text.
public CodedException(Error code,
java.lang.String[] fields)
code - The code key used to look up the error text.fields - An array of field values to replace fields in the error message.
public CodedException(Error code,
java.lang.String field)
code - The code key used to look up the error text.field - A single value with which to replace the error message field.
public CodedException(Error code,
java.lang.Throwable exception)
code - The Error of this particular exception.exception - The root cause of the problem.
public CodedException(Error code,
java.lang.String field,
java.lang.Throwable exception)
code - The code key used to look up the error text.field - A single value with which to replace the error message field.exception - The source of the error.
public CodedException(Error code,
java.lang.String[] fields,
java.lang.Throwable exception)
code - The code key used to look up the error text.fields - An array of field values to replace fields in the error message.exception - The source of the error.| Method Detail |
|---|
protected final void init(Error code,
java.lang.String[] fields)
code - The code key used to look up the error text.fields - An array of field values to replace fields in the error message.public final java.lang.String getMessage()
getMessage - Check the error code to see if
it's an ExtendedError.
Based on the result, pull the error string from the appropriate
resource bundle (business logic errors or general CAM errors).
getMessage in class java.lang.ThrowableString value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||