comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Exception
Date: Thu, 08 Sep 2005 19:20:13 +0200
Date: 2005-09-08T19:20:13+02:00	[thread overview]
Message-ID: <1434987.efhUJNL8If@linux1.krischik.com> (raw)
In-Reply-To: z1_Te.53963$HM1.1508226@twister1.libero.it

TC wrote:

> Why if an error is present no one of exception is write?
> I create an array index exception for testing.


> procedure Testo is
> Begin
> ...
> exception
>                    when Error : Constraint_Error | Data_Error =>
>                    Put ("Si ᅵ verificato un errore: ");
>                    Put_Line (Ada.Exceptions.Exception_Name(Error));
>                    when Error : others=>
>                    Put ("Si ᅵ verificato un errore: ");
>                    Put_Line (Ada.Exceptions.Exception_Name(Error));
>                      raise;
> end testo;

One possibility: Only exceptions between begin and exception are handled. If
the exception happens between is and being it goes to the caller.

Note: this is especially important when dealing with task types.

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



  parent reply	other threads:[~2005-09-08 17:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-08 16:54 Exception TC
2005-09-08 17:06 ` Exception Pascal Obry
2005-09-08 17:20 ` Martin Krischik [this message]
2005-09-08 18:21 ` Exception Georg Bauhaus
  -- strict thread matches above, loose matches on Subject: below --
1998-11-18  0:00 exception alex
1998-10-30  0:00 exception Pablo Campo
1998-10-30  0:00 ` exception Corey Ashford
1998-10-31  0:00 ` exception Jerry van Dijk
1998-11-03  0:00 ` exception Steve Quinlan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox