Exception mechanism support
Java in embedded and real-time systems
Article REF: S8068 V1
Exception mechanism support
Java in embedded and real-time systems

Author : Xavier CORNU

Publication date: June 10, 2004 | Lire en français

Logo Techniques de l'Ingenieur You do not have access to this resource.
Request your free trial access! Free trial

Already subscribed?

5. Exception mechanism support

5.1 Exceptions in Java

Exceptions are a classic programming language construct. They enable programmers to handle unexpected situations in a unified way. Exceptions in Java are very similar to those defined in other programming languages such as Ada or C++.

In Java, exceptions are implemented mainly using the following three keywords:

  • try is used to define the block in which an exception may occur: because of one of the instructions in the block defined by try, or inside one of the procedures called from the block (nested calls);

  • catch is used to define the code of the exception handler block;

  • throw is used to signal that an exception has occurred....

You do not have access to this resource.
Logo Techniques de l'Ingenieur

Exclusive to subscribers. 97% yet to be discovered!

You do not have access to this resource. Click here to request your free trial access!

Already subscribed?


Article included in this offer

"Control and systems engineering"

( 143 articles )

Complete knowledge base

Updated and enriched with articles validated by our scientific committees

Services

A set of exclusive tools to complement the resources

View offer details