public abstract class CodedException
extends org.apache.maven.plugin.MojoExecutionException
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage()
getMessage - Check the error code to see if
it's an ExtendedError. |
protected void |
init(Error code,
String[] fields)
Initialize the instance.
|
getLongMessage, getSourceaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected static final Error MISSING_ERROR_KEY
protected Error error
protected String[] errorFields
protected ResourceBundle errors
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.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 ThrowableString valueCopyright © 2005–2016. All rights reserved.