javax.microedition.global
Class ResourceException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.microedition.global.ResourceException

public final class ResourceException
extends RuntimeException

Thrown when a resource manager operation fails.

Since:
BlackBerry API 4.3.0

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, 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

UNKNOWN_ERROR

public static final int UNKNOWN_ERROR
Unknown error.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

RESOURCE_NOT_FOUND

public static final int RESOURCE_NOT_FOUND
A resource with the specified ID was not found.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

WRONG_RESOURCE_TYPE

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).

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

NO_RESOURCES_FOR_BASE_NAME

public static final int NO_RESOURCES_FOR_BASE_NAME
No resources for this base name found.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

NO_SYSTEM_DEFAULT_LOCALE

public static final int NO_SYSTEM_DEFAULT_LOCALE
The system's default locale is not defined (is null).

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

DATA_ERROR

public static final int DATA_ERROR
A data error occurred when reading the resource file.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

UNKNOWN_RESOURCE_TYPE

public static final int UNKNOWN_RESOURCE_TYPE
Encountered an unknown resource type in the resource file.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

METAFILE_NOT_FOUND

public static final int METAFILE_NOT_FOUND
Meta-information file containing information about supported locales not found for base name.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0


Constructor Detail

ResourceException

public ResourceException(int err,
                         String message)
Constructs an exception instance with an error code and a detail message.

Parameters:
err - the error code
message - the detail message
Since:
BlackBerry API 4.3.0


Method Detail

getErrorCode

public int getErrorCode()
Returns the error code associated with this exception.

Returns:
the error code
Since:
BlackBerry API 4.3.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal