Ada Programming/Libraries/Ada.Exceptions
< Ada Programming < LibrariesComputing » Computer Science » Computer Programming » Ada Programming

The package Ada.Exceptions allows you to analyze exceptions you have caught, to raise exceptions with an associated message or to save exceptions occurrences for later processing.
Usage
The following example shows how to implement a "last resort" error handler which just displays the information related to the error which occurred.
with Ada.Exceptions; procedure Numeric_6 is package Exept renames Ada.Exceptions; ... exception when An_Exception : others => T_IO.Put_Line (Exept.Exception_Information (An_Exception)); end Try;
See also
Wikibook
Ada Reference Manual
Ada 95
Ada 2005
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.