BenQ Mobile

javax.microedition.global
Class ResourceException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byjavax.microedition.global.ResourceException
All Implemented Interfaces:
java.io.Serializable

public final class ResourceException
extends java.lang.RuntimeException

Thrown when a resource manager operation fails. Typical examples of such operations are:

  • Attempting to retrieve a non-existing resource.
  • Constructing a resource manager for a base name that does not have any associated resources.
  • Relying on the system default locale when it is null.
  • Error codes and detail messages

    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.

    Copyright: Copyright (c) Siemens AG 2004 * ALL RIGHTS RESERVED

    Version:
    0.1
    Author:
    COM SWC 21 MAO
    See Also:
    Serialized Form

    Field Summary
    static int DATA_ERROR
               
    static int METAFILE_NOT_FOUND
               
    static int NO_RESOURCEFOR_BASE_NAME
               
    static int NO_SYSTEM_DEFAULT_LOCALE
               
    static int RESOURCE_NOT_FOUND
               
    static int UNKNOWN_ERROR
               
    static int UNKNOWN_RESOURCE_TYPE
               
    static int WRONG_RESOURCE_TYPE
               
     
    Constructor Summary
    ResourceException(int errorCode, 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
    fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

    UNKNOWN_ERROR

    public static final int UNKNOWN_ERROR
    See Also:
    Constant Field Values

    RESOURCE_NOT_FOUND

    public static final int RESOURCE_NOT_FOUND
    See Also:
    Constant Field Values

    WRONG_RESOURCE_TYPE

    public static final int WRONG_RESOURCE_TYPE
    See Also:
    Constant Field Values

    NO_RESOURCEFOR_BASE_NAME

    public static final int NO_RESOURCEFOR_BASE_NAME
    See Also:
    Constant Field Values

    NO_SYSTEM_DEFAULT_LOCALE

    public static final int NO_SYSTEM_DEFAULT_LOCALE
    See Also:
    Constant Field Values

    DATA_ERROR

    public static final int DATA_ERROR
    See Also:
    Constant Field Values

    UNKNOWN_RESOURCE_TYPE

    public static final int UNKNOWN_RESOURCE_TYPE
    See Also:
    Constant Field Values

    METAFILE_NOT_FOUND

    public static final int METAFILE_NOT_FOUND
    See Also:
    Constant Field Values
    Constructor Detail

    ResourceException

    public ResourceException(int errorCode,
                             java.lang.String message)
                      throws java.lang.IllegalArgumentException
    Constructs an exception instance with an error code and a detail message.

    Parameters:
    errorCode - the error code
    message - the detail message
    Method Detail

    getErrorCode

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

    Returns:
    the error code

    BenQ Mobile

    Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner.
    All Rights Reserved.
    BenQ Corp. is a trademark licensee of Siemens AG.


    For further information about Mobility Toolkit (MTK) visit our Developer Portal.