Abstract
The standard Ada run-time library provides the package Ada.Exceptions. This package provides a number of services to help analyze exceptions. Each exception is associated with a (short) message that can be set by the code that raises the exception. In more recent versions of Ada, these messages can be set very simply, as in the following code:
Recommendations
Gem #149: Asserting the truth, but (possibly) not the whole truth
Let's get started? In the beginning was created Ada. It did not have any assertions. Then came GNAT, which introduced pragma Assert. The ARG saw that it was good, and adopted it in Ada 2005. Then came GNAT again, which introduced pragma Precondition and ...
Gem #58: Ada / Java exception handling
Ada and Java are two languages that rely heavily on exceptions. A large part of the Ada data model is based on the fact that data is checked at run time, and will raise various kinds of exceptions such as Constraint_Error when constraints are violated. ...
Gem #37: bounded buffer package in GNAT hierarchy (part 2)
Ada Gem #37 --- Part 1 of this Gem briefly introduced bounded buffers, protected types, and the declaration of the generic package GNAT. Bounded_Buffers, exporting protected type Bounded_Buffer. In Part 2 of the Gem we examine the private part of ...






Comments