|
||||||||||
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 String[] |
errorFields
Any fields which would need to be filled in within the error message. |
protected 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,
String field)
An exception with an error code and fields in the message. |
|
CodedException(Error code,
String[] fields)
An exception with an error code and fields in the message. |
|
CodedException(Error code,
String[] fields,
Throwable exception)
Creates a coded exception with fields and a root cause. |
|
CodedException(Error code,
String field,
Throwable exception)
Creates a coded exception with fields and a root cause. |
|
CodedException(Error code,
Throwable exception)
Creates a new Coded Exception, given an error code and root cause. |
Method Summary | |
---|---|
String |
getMessage()
getMessage - Check the error code to see if
it's an ExtendedError . |
protected void |
init(Error code,
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 String[] errorFields
protected 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, 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, 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, Throwable exception)
code
- The Error of this particular exception.exception
- The root cause of the problem.public CodedException(Error code, String field, 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, String[] fields, 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, 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 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 Throwable
String
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |