=== 8.3.5.2 Exception Response Encoding === Following is the encoding when an API defined exception is thrown by the remote method. It may be returned during any remote method invocation. The **reason** item is the Java Card platform exception reason code, or **0** for a **java.lang,** **java.rmi** or **java.io** exceptions: Following are the values for the **exception_type** item: java.lang.Throwable = 0x00 java.lang.ArithmeticException = 0x01 java.lang.ArrayIndexOutOfBoundsException = 0x02 java.lang.ArrayStoreException = 0x03 java.lang.ClassCastException = 0x04 java.lang.Exception = 0x05 java.lang.IndexOutOfBoundsException = 0x06 java.lang.NegativeArraySizeException = 0x07 java.lang.NullPointerException = 0x08 java.lang.RuntimeException = 0x09 java.lang.SecurityException = 0x0A java.io.IOException = 0x0B java.rmi.RemoteException = 0x0C javacard.framework.APDUException = 0x20 javacard.framework.CardException = 0x21 javacard.framework.CardRuntimeException = 0x22 javacard.framework.ISOException = 0x23 javacard.framework.PINException = 0x24 javacard.framework.SystemException = 0x25 javacard.framework.TransactionException = 0x26 javacard.framework.UserException = 0x27 javacard.security.CryptoException = 0x30 javacard.framework.service.ServiceException = 0x40 javacardx.biometry.BioException = 0x50 javacardx.external.ExternalException = 0x60 javacardx.framework.tlv.TLVException = 0x70 javacardx.framework.util.UtilException = 0x80 Following is the encoding when a user defined exception is thrown by the remote method. The **exception_type** item represents the closest API defined exception type. It may be returned during any remote method invocation. The **reason** item is the Java Card platform exception reason code, or **0** for the subclasses of **java.lang**,** java.rmi** or **java.io** exceptions: