|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.iac.ing.codeso.gen.ErrorManager
public class ErrorManager
Provides the CODESO error management facility, a repository for storing information about errors which may occur in a CODESO application and which are known at compile-time.
Each error is associated with an Error Code, an Error Summary and an Error Message.
The Error Code should be a unique integer which describes the error situation. The Error Code may be used as the handle to look up error information known by this class.
The Error Summary should be a short description of the nature of the problem, suitable perhaps, for displaying as the title for a pop-up error box. The Error Message should provide a more detailed explanation of the error.
The information in the error catalog is built when this class is first
referenced using information obtained from a set of error sub-catalogues
previously registered with the ResourceManager
.
The class adopts a best-efforts basis when initialising itself: the
failure of a single catalogue to load does not preclude others from
being loaded and used successfully.
Constructor Summary | |
---|---|
ErrorManager()
|
Method Summary | |
---|---|
static java.lang.String |
getMessage(int errorCode)
Retrieves the error message associated with an error code. |
static java.lang.String |
getRemedy(int errorCode)
Retrieves the error remedy associated with an error code. |
static java.lang.String |
getSummary(int errorCode)
Retrieves the error summary associated with an error code. |
static void |
initialise()
Initialises or reinitialises the error manager using the error resources held within the CODESO ResourceManager . |
static boolean |
isKnownError(int errorCode)
Returns a boolean indicating whether the specified error code is an error previously registed with the error manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorManager()
Method Detail |
---|
public static void initialise()
ResourceManager
. Invoking this method is optional: the class is automatically initialised when the class is first loaded by the JVM. However, it may prove useful if it is required to dynamically rebuild the error information at runtime.
public static boolean isKnownError(int errorCode)
errorCode
- the code to test.
public static java.lang.String getSummary(int errorCode)
If the error code is not recognised and the class initialised normally a descriptive string will be returned saying something like:
"Error Code Unknown: Error Summary Unavailable"
If the error code is not recognised and the class had problems when attempting to load one or more error catalogues then a descriptive string will be returned saying something like:
"Error Code Unknown: Error Catalogue Load Failure"
errorCode
- int the error code to look up.
public static java.lang.String getMessage(int errorCode)
If the error code is not recognised a descriptive string will be returned saying something like:
"Error Code Unknown: Error Message Unavailable"
If the error code is not recognised and the class had problems when attempting to load one or more error catalogues then a descriptive string will be returned saying something like:
"Error Code Unknown: Error Catalogue Load Failure"
errorCode
- int the error code to look up.
public static java.lang.String getRemedy(int errorCode)
If the error code is not recognised a descriptive string will be returned saying something like:
"Error Code Unknown: Error Remedy Unavailable"
If the error code is not recognised and the class had problems when attempting to load one or more error catalogues then a descriptive string will be returned saying something like:
"Error Code Unknown: Error Catalogue Load Failure"
errorCode
- int the error code to look up.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |