From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Common exception handling
Date: Tue, 26 Aug 2008 05:48:56 -0700 (PDT)
Date: 2008-08-26T05:48:56-07:00 [thread overview]
Message-ID: <e475f941-5d8c-432d-ae90-c41bc8ee2990@r15g2000prh.googlegroups.com> (raw)
In-Reply-To: 1d1a76fa-a537-4994-9578-7c7604b26ca2@w24g2000prd.googlegroups.com
Martin wrote:
> exception
> when A =>
> Put_Line ("A");
> when B =>
> Put_Line ("B");
> when C =>
> Put_Line ("C");
> when others =>
> Put_Line ("others");
If all you want it to print the name of the exception, it is better
like this:
exception
when E : others =>
Put_Line (Ada.Exceptions.Exception_Name (E));
--
Ludovic Brenta.
next prev parent reply other threads:[~2008-08-26 12:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 12:17 Common exception handling shaunpatterson
2008-08-26 12:37 ` Ludovic Brenta
2008-08-26 12:39 ` Martin
2008-08-26 12:48 ` Ludovic Brenta [this message]
2008-08-26 12:58 ` Martin
2008-08-26 13:47 ` shaunpatterson
2008-08-26 14:43 ` Adam Beneschan
2008-08-26 15:10 ` Dmitry A. Kazakov
2008-08-26 16:49 ` Adam Beneschan
2008-08-26 19:14 ` Dmitry A. Kazakov
2008-08-26 20:22 ` Maciej Sobczak
2008-08-27 8:16 ` Dmitry A. Kazakov
2008-08-27 9:20 ` Georg Bauhaus
2008-08-29 8:32 ` Martin
2008-08-29 15:31 ` Adam Beneschan
2008-09-10 22:51 ` Martin
2008-09-11 14:57 ` Adam Beneschan
2008-08-26 15:18 ` Jean-Pierre Rosen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox