Why did my applet can not throw exception?
Posted: Fri Dec 11, 2015 4:42 am
I have finished a simple applet. But I faced a problem. I can select it successfully, but when I sent "00000000", it didn't have any reaction.
My applet can not throw exception 0x8080. It seemed that it couldn't run to this line at all.
Kindly help please. What's wrong?
APDU:
Code:
My applet can not throw exception 0x8080. It seemed that it couldn't run to this line at all.
.ISOException.throwIt((short) 0x8080);
Kindly help please. What's wrong?
APDU:
Code:
Code: Select all
package test002;
import javacard.framework.*;
public class test extends Applet
{
public static void install(byte[] bArray, short bOffset, byte bLength)
{
new test().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
}
public void process(APDU apdu)
{
if (selectingApplet())
{
return;
}
byte[] buf = apdu.getBuffer();
switch (buf[ISO7816.OFFSET_INS])
{
default:
ISOException.throwIt((short) 0x8080);
}
}
}