Exception handling syntax: Difference between revisions

Content deleted Content added
Line 19:
==== Exception handling and propagation ====
 
'''with''' Ada.Exceptions; '''use''', Ada.ExceptionsText_IO;
'''procedure''' Foo '''is'''
Line 33:
'''when''' Error : '''others''' =>
''-- Handle all others''
Ada.Text_IO.Put ("Exception: ");
Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Name (Error));
Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (Error));
'''end''' Foo;