uicc.toolkit

## Class ToolkitException

- java.lang.Object
- - CardRuntimeException
  - - uicc.toolkit.ToolkitException

-     public class ToolkitException
      extends CardRuntimeException

  This class extends the `Throwable` class and allows the classes of this package to throw specific exceptions in case of problems.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static short` | `ALLOWED_LENGTH_EXCEEDED` This reason code (=10) is used to indicate that the provided menu entry string is bigger than the allocated space
    `static short` | `BAD_INPUT_PARAMETER` This reason code (=14) is used to indicate that an input parameter of the method is not valid
    `static short` | `COMMAND_NOT_ALLOWED` This reason code (=15) is used to indicate that the proactive command being sent is not allowed by the CAT Runtime Environment.
    `static short` | `EVENT_ALREADY_REGISTERED` This reason code (= 7) is used to indicate that the maximum number of registered applet for this event is already reached (e.g Call Control)
    `static short` | `EVENT_NOT_ALLOWED` This reason code (=13) is used to indicate that the registration to an indicated event can not be changed by the called method.
    `static short` | `EVENT_NOT_SUPPORTED` This reason code (= 6) is used to indicate that the event code is not supported by the CAT Runtime Environment
    `static short` | `HANDLER_NOT_AVAILABLE` This reason code (= 2) is used to indicate that the Handler is not available (e.g.
    `static short` | `HANDLER_OVERFLOW` This reason code (= 1) is used to indicate that data are to large than the storage space available in the handler.
    `static short` | `INVALID_SERVICE_ID` This reason code (=17) is used to indicate that the service identifier is not allocated to this applet.
    `static short` | `INVALID_TIMER_ID` This reason code (=12) is used to indicate that the indicated timer identifier is not allocated to this applet.
    `static short` | `MENU_ENTRY_NOT_FOUND` This reason code (= 4) is used to indicate that the requested menu entry is not defined for the corresponding applet.
    `static short` | `NO_SERVICE_ID_AVAILABLE` This reason code (=16) is used to indicate that all the available services identifiers or the maximum number of services identifiers have been allocated to the applet
    `static short` | `NO_TIMER_AVAILABLE` This reason code (=11) is used to indicate that all the available timers or the maximum number of timers have been allocated to the applet
    `static short` | `OUT_OF_TLV_BOUNDARIES` This reason code (= 8) is used to indicate that either the offset, the length or both are out of current TLV boundaries
    `static short` | `REGISTRY_ERROR` This reason code (= 5) is used to indicate an error in the applet registry
    `static short` | `TAR_NOT_DEFINED` This reason code (=18) is used to indicate that there is no TAR defined for the applet instance.
    `static short` | `TERMINAL_PROFILE_NOT_AVAILABLE` This reason code (= 9) is used to indicate that the Terminal Profile data are not available
    `static short` | `UNAVAILABLE_ELEMENT` This reason code (= 3) is used to indicate that the element is unavailable in the handler buffer.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ToolkitException(short reason)` Construct a ToolkitException instance with the specified reason.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `throwIt(short reason)` Throws the JCRE instance of the `ToolkitException` class with the specified reason.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### HANDLER_OVERFLOW

          public static final short HANDLER_OVERFLOW

      This reason code (= 1) is used to indicate that data are to large than the storage space available in the handler.
      See Also:
        Constant Field Values

    - #### HANDLER_NOT_AVAILABLE

          public static final short HANDLER_NOT_AVAILABLE

      This reason code (= 2) is used to indicate that the Handler is not available (e.g. busy).
      See Also:
        Constant Field Values

    - #### UNAVAILABLE_ELEMENT

          public static final short UNAVAILABLE_ELEMENT

      This reason code (= 3) is used to indicate that the element is unavailable in the handler buffer.
      See Also:
        Constant Field Values

    - #### MENU_ENTRY_NOT_FOUND

          public static final short MENU_ENTRY_NOT_FOUND

      This reason code (= 4) is used to indicate that the requested menu entry is not defined for the corresponding applet.
      See Also:
        Constant Field Values

    - #### REGISTRY_ERROR

          public static final short REGISTRY_ERROR

      This reason code (= 5) is used to indicate an error in the applet registry
      See Also:
        Constant Field Values

    - #### EVENT_NOT_SUPPORTED

          public static final short EVENT_NOT_SUPPORTED

      This reason code (= 6) is used to indicate that the event code is not supported by the CAT Runtime Environment
      See Also:
        Constant Field Values

    - #### EVENT_ALREADY_REGISTERED

          public static final short EVENT_ALREADY_REGISTERED

      This reason code (= 7) is used to indicate that the maximum number of registered applet for this event is already reached (e.g Call Control)
      See Also:
        Constant Field Values

    - #### OUT_OF_TLV_BOUNDARIES

          public static final short OUT_OF_TLV_BOUNDARIES

      This reason code (= 8) is used to indicate that either the offset, the length or both are out of current TLV boundaries
      See Also:
        Constant Field Values

    - #### TERMINAL_PROFILE_NOT_AVAILABLE

          public static final short TERMINAL_PROFILE_NOT_AVAILABLE

      This reason code (= 9) is used to indicate that the Terminal Profile data are not available
      See Also:
        Constant Field Values

    - #### ALLOWED_LENGTH_EXCEEDED

          public static final short ALLOWED_LENGTH_EXCEEDED

      This reason code (=10) is used to indicate that the provided menu entry string is bigger than the allocated space
      See Also:
        Constant Field Values

    - #### NO_TIMER_AVAILABLE

          public static final short NO_TIMER_AVAILABLE

      This reason code (=11) is used to indicate that all the available timers or the maximum number of timers have been allocated to the applet
      See Also:
        Constant Field Values

    - #### INVALID_TIMER_ID

          public static final short INVALID_TIMER_ID

      This reason code (=12) is used to indicate that the indicated timer identifier is not allocated to this applet.
      See Also:
        Constant Field Values

    - #### EVENT_NOT_ALLOWED

          public static final short EVENT_NOT_ALLOWED

      This reason code (=13) is used to indicate that the registration to an indicated event can not be changed by the called method.
      See Also:
        Constant Field Values

    - #### BAD_INPUT_PARAMETER

          public static final short BAD_INPUT_PARAMETER

      This reason code (=14) is used to indicate that an input parameter of the method is not valid
      See Also:
        Constant Field Values

    - #### COMMAND_NOT_ALLOWED

          public static final short COMMAND_NOT_ALLOWED

      This reason code (=15) is used to indicate that the proactive command being sent is not allowed by the CAT Runtime Environment.
      See Also:
        Constant Field Values

    - #### NO_SERVICE_ID_AVAILABLE

          public static final short NO_SERVICE_ID_AVAILABLE

      This reason code (=16) is used to indicate that all the available services identifiers or the maximum number of services identifiers have been allocated to the applet
      See Also:
        Constant Field Values

    - #### INVALID_SERVICE_ID

          public static final short INVALID_SERVICE_ID

      This reason code (=17) is used to indicate that the service identifier is not allocated to this applet.
      See Also:
        Constant Field Values

    - #### TAR_NOT_DEFINED

          public static final short TAR_NOT_DEFINED

      This reason code (=18) is used to indicate that there is no TAR defined for the applet instance.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ToolkitException

          public ToolkitException(short reason)

      Construct a ToolkitException instance with the specified reason. To conserve on resources use `throwIt()` method to re-use the JCRE instance of this class.
      Parameters:
        `reason` - the reason for the exception

  - ### Method Detail

    - #### throwIt

          public static void throwIt(short reason)
                              throws ToolkitException

      Throws the JCRE instance of the `ToolkitException` class with the specified reason.
      Parameters:
        `reason` - the reason for the exception.
      Throws:
        `ToolkitException` - always

Copyright © 2017 ETSI All Rights Reserved.