DEVELOPMENT EDITION · 769442725406
Library Reference
On this page

Package Ada.Exceptions

Ada.Exceptions (RM 11.4.1), the part Verada keeps: the name, message and information of the occurrence a handler names (when X : E), and its raising again. An occurrence is a copy, taken when the handler starts, of the exception's full name and the message it was raised with. Only memory limits them (Verada.Storage).

Exception_Occurrence

type Exception_Occurrence is limited private;

Exception_Name

function Exception_Name (X : Exception_Occurrence) return String
  with Global => null,
       Post => Exception_Name'Result'Length < Verada.Storage.Length_Bound;

the exception's full name, PACKAGE.NAME in upper case

Exception_Message

function Exception_Message (X : Exception_Occurrence) return String
  with Global => null,
       Post => Exception_Message'Result'Length < Verada.Storage.Length_Bound;

the message of raise E with "...", whole, or ""

Exception_Information

function Exception_Information (X : Exception_Occurrence) return String
  with Global => null,
       Post => Exception_Information'Result'Length <= 2 * Verada.Storage.Length_Bound;

the name and the message together: NAME, or NAME: message when there is a message

Reraise_Occurrence

procedure Reraise_Occurrence (X : Exception_Occurrence)
  with Import, Convention => Intrinsic, Global => null;

the occurrence X raised again: only X of the handler that names it (when X : E), where it is raise;, so the subprogram's Exceptional_Cases cover the handler's exceptions as for any raise (another occurrence is left out: its exception is not known to the proof)

Current_Occurrence

function Current_Occurrence return Exception_Occurrence
  with Global => null;

(Verada) the occurrence being handled: what when X : E names