From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: How to get nice with GNAT? Date: Thu, 27 Nov 2014 18:19:16 +0100 Organization: cbb software GmbH Message-ID: <1g5ttpzi8eywc$.1gluj9evlmeus.dlg@40tude.net> References: <969708583438656051.436159nonlegitur-futureapps.invalid@reader80.eternal-september.org> <0d085a5a-d4ac-4506-ae5f-8da685f39004@googlegroups.com> <1ukyfvaqgkwo1.6ngfx1v21twz$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: wfRpp7ltpEWhI2na6kgpfA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:23772 Date: 2014-11-27T18:19:16+01:00 List-Id: On Thu, 27 Nov 2014 05:53:27 -0800 (PST), brbarkstrom@gmail.com wrote: > Sure, but often enough we add in exceptions after having to respond to an > unexpected event. And this still is a BUG. An unexpected even means that the system is in an undefined state, there is nothing you could do with this. All other cases, even when the system (subsystem actually) gets shut down, restarted etc are actions in response to some *expected* event. E.g. even memory access violation is an event expected by the OS process scheduler or debugger etc. > The addition of the exception comes in maintenance, rather > than as result of the design work. Yes, but that is when the state is expected but undesired. It is not a bug at the side which raised the exception. It could be a bug on the client's side, e.g. due to improper usage. What is usually meant by exceptions being bugs is that the code raises an exception where some other behavior specified. That is indeed a bug, but it is not specific to exceptions, like with the example of + used instead of *. Any wrong behavior is a bug. The idea that all/most/some bugs should somehow manifest their wrong behavior in exceptions is dubious. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de