Chapter 6. Java Card Exceptions and Exception Handling

An exception is an event that disrupts the normal flow of instructions during the execution of a program. Exceptions are important in the Java language because they provide an elegant way of handling errors in a program.

The Java Card platform supports all the Java programming language constructs for exceptions. A Java Card applet can use keywords throw, try, catch, or finally, and they work the same as in the Java platform.

Exceptions are thrown by the JCRE classes and the Java Card virtual machine when internal runtime problems are detected or are thrown programmatically by applets. Although the Java Card platform has full support for Java-style exceptions, there are differences in usage, ...

Get Java Card™ Technology for Smart Cards now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.