GNAT Exceptions g-except ads (GNAT Reference Manual) (original) (raw)

Next: GNAT.Expect (g-expect.ads), Previous: GNAT.Exception_Traces (g-exctra.ads), Up: The GNAT Library [Contents][Index]


12.69 GNAT.Exceptions (g-except.ads)

Normally it is not possible to raise an exception with a message from a subprogram in a pure package, since the necessary types and subprograms are in Ada.Exceptionswhich is not a pure unit. GNAT.Exceptions provides a facility for getting around this limitation for a few predefined exceptions, and for example allows raisingConstraint_Error with a message from a pure subprogram.