-- -- $Id$ -- with Ada.Text_IO; use Ada.Text_IO; procedure ExceptionTest2 is function F return Boolean is begin Put_Line ("*** Exception Test 2 ***"); raise Constraint_Error; return True; end F; begin begin if F then Put_Line ("Not ok"); else Put_Line ("Not ok and bad value"); end if; exception when others => Put_Line ("Caught Constraint_Error -- inner"); Put_Line ("*** END OF Exception Test 2 ***"); end; exception when others => Put_Line ("Caught Constraint_Error -- outer -- not OK"); end ExceptionTest2; --END exceptiontest2.adb