comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Exceptions and out procedure arguments (using GNAT GPL)
Date: Tue, 19 Jun 2007 16:40:31 -0500
Date: 2007-06-19T16:40:31-05:00	[thread overview]
Message-ID: <f59ibv$5ep$1@jacob-sparre.dk> (raw)
In-Reply-To: drle731ukcmhlt5km966imoudr5s92napd@4ax.com

"Fionn Mac Cumhaill" <invisible@hiding.from.spam> wrote in message
news:drle731ukcmhlt5km966imoudr5s92napd@4ax.com...
...
> I eliminated the problem by modifying the offending procedure to not
> raise exceptions. It now returns a status code in an additional out
> argument.

My initial reaction to this was that it is like cutting off your foot
because your toe itches. ;-)

But I do have to agree with Adam that there is something wrong with the
design if you are expecting to get results back even if an exception is
raised. That does seem to be inappropriate use of an exception; it's not an
error at all if you expect results (it's just another normal case).

Still, in general result codes make me ill, so I would be at least as
concerned about a design that seems to be combining two operations (one to
return the initial results, and one to make the checks that lead to errors).

                         Randy.





      parent reply	other threads:[~2007-06-19 21:40 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-16  1:05 Exceptions and out procedure arguments (using GNAT GPL) Fionn Mac Cumhaill
2007-06-16  1:53 ` Anh Vo
2007-06-16  2:50 ` Brian May
2007-06-16  3:08 ` Randy Brukardt
2007-06-16  6:55 ` Dmitry A. Kazakov
2007-06-18 15:44 ` Adam Beneschan
2007-06-19  5:23   ` Fionn Mac Cumhaill
2007-06-19  7:34     ` Maciej Sobczak
2007-06-19 15:21       ` Adam Beneschan
2007-06-19 20:07         ` Dmitry A. Kazakov
2007-06-19 21:20           ` Adam Beneschan
2007-06-20  6:16             ` Georg Bauhaus
2007-06-20  8:01             ` Dmitry A. Kazakov
2007-06-20  8:45               ` Georg Bauhaus
2007-06-20  9:29                 ` Dmitry A. Kazakov
2007-06-20  6:21           ` Georg Bauhaus
2007-06-20  8:02             ` Dmitry A. Kazakov
2007-06-20  8:46               ` Georg Bauhaus
2007-06-20  9:29                 ` Dmitry A. Kazakov
2007-06-20 10:13                   ` Georg Bauhaus
2007-06-20 12:58                     ` Dmitry A. Kazakov
2007-06-20 14:16                       ` Georg Bauhaus
2007-06-20 18:22                         ` Dmitry A. Kazakov
2007-06-20 19:16                           ` Georg Bauhaus
2007-06-20 20:40                             ` Dmitry A. Kazakov
2007-06-21  9:52                               ` Georg Bauhaus
2007-06-21 13:48                                 ` Dmitry A. Kazakov
2007-06-22 18:15                                   ` Georg Bauhaus
2007-06-22 19:45                                     ` Dmitry A. Kazakov
2007-06-20 15:15         ` Fionn Mac Cumhaill
2007-06-19 21:40     ` Randy Brukardt [this message]
replies disabled

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