|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException javax.microedition.global.ResourceException
Thrown when a resource manager operation fails. Typical examples of operations that may fail are:
null
.This class defines symbolic constants for error codes related to
ResourceExceptions. The detail message corresponding to the error can
be retrieved using the getMessage
method. The detail
messages SHOULD be localized.
Field Summary | |
static int |
DATA_ERROR
A data error occurred when reading the resource file. |
static int |
METAFILE_NOT_FOUND
Meta-information file containing information about supported locales not found for base name. |
static int |
NO_RESOURCES_FOR_BASE_NAME
No resources for this base name found. |
static int |
NO_SYSTEM_DEFAULT_LOCALE
The system's default locale is not defined (is null ). |
static int |
RESOURCE_NOT_FOUND
A resource with the specified ID was not found. |
static int |
UNKNOWN_ERROR
Unknown error. |
static int |
UNKNOWN_RESOURCE_TYPE
Encountered an unknown resource type in the resource file. |
static int |
WRONG_RESOURCE_TYPE
Wrong resource type. |
Constructor Summary | |
ResourceException(int err,
java.lang.String message)
Constructs an exception instance with an error code and a detail message. |
Method Summary | |
int |
getErrorCode()
Returns the error code associated with this exception. |
Methods inherited from class java.lang.Throwable |
getMessage, printStackTrace, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DATA_ERROR
A data error occurred when reading the resource file.
public static final int METAFILE_NOT_FOUND
Meta-information file containing information about supported locales not found for base name.
public static final int NO_RESOURCES_FOR_BASE_NAME
No resources for this base name found.
public static final int NO_SYSTEM_DEFAULT_LOCALE
The system's default locale is not defined (is null
).
public static final int RESOURCE_NOT_FOUND
A resource with the specified ID was not found.
public static final int UNKNOWN_ERROR
Unknown error.
public static final int UNKNOWN_RESOURCE_TYPE
Encountered an unknown resource type in the resource file.
public static final int WRONG_RESOURCE_TYPE
Wrong resource type. Used when the method used does not
match the resource retrieved with it (e.g. getString
used to retrieve a byte array resource).
Constructor Detail |
public ResourceException(int err, java.lang.String message)
Constructs an exception instance with an error code and a detail message.
err
- the error codemessage
- the detail message
java.lang.IllegalArgumentException
- if the error code is undefinedMethod Detail |
public int getErrorCode()
Returns the error code associated with this exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |