comp.lang.ada
 help / color / mirror / Atom feed
From: Rod Kay <rodakay5@gmail.com>
Subject: Re: Extra information in the message string of exceptions.
Date: Tue, 7 Jun 2022 21:47:38 +1000	[thread overview]
Message-ID: <t7ne2k$t4d$1@dont-email.me> (raw)
In-Reply-To: <t7mde9$th0$1@dont-email.me>

On 7/6/22 12:33, Randy Brukardt wrote:
> 
> Janus/Ada has *always* done this (going all the way back to the original
> Z-80 CP/M compiler).

    Very nice !

  This particular case is not very expensive, since one
> can use the fact that the out-of-range value is certainly in a register to
> be tested in order to construct the message. And no real program cares about
> the performance of raising Constraint_Error

    I didn't think that there would be too much impact on performance.


  -- the main issue is one of
> space (making the program larger).
> 
    I hadn't really considered the extra space required. For a 
desktop/workstation/server, I expect the extra space would not be a huge 
consideration. For embedded systems and such, I guess it might be, 
though if the feature could be switched off for production releases 
perhaps not such a big problem.



> P.S. I'd quibble with the OP, in that the vast majority of Constraint_Errors
> have nothing to do with the standard library; their checks are compiled
> directly into the code of your application.

    Quite right. I should simply have said the standard exceptions, 
wherever they are raised.

  reply	other threads:[~2022-06-07 11:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 12:59 Extra information in the message string of exceptions Rod Kay
2022-06-06 13:40 ` Fabien Chouteau
2022-06-06 18:40   ` G.B.
2022-06-06 19:24     ` Dmitry A. Kazakov
2022-06-07 11:26   ` Rod Kay
2022-06-07 15:55   ` Fabien Chouteau
2022-06-07 16:41     ` Anh Vo
2022-06-08  7:31     ` Jerry
2022-06-08  8:04       ` Dmitry A. Kazakov
2022-06-09  2:39         ` Jerry
2022-06-08  9:08       ` Dmitry A. Kazakov
2022-10-27 11:56         ` Rod Kay
2022-10-29  0:35           ` Jerry
2022-10-29  3:10             ` Rod Kay
2022-10-29  6:30               ` Gautier write-only address
2022-10-29  8:59               ` G.B.
2022-11-01  0:05             ` Jerry
2022-06-06 14:31 ` Gautier write-only address
2022-06-07  2:33   ` Randy Brukardt
2022-06-07 11:47     ` Rod Kay [this message]
2022-06-07 11:29   ` Rod Kay
2022-06-06 20:14 ` Luke A. Guest
2022-06-07 11:51   ` Rod Kay
2022-06-07 21:06     ` Luke A. Guest
2022-06-06 20:49 ` DrPi
2022-06-06 23:17   ` Jerry
2022-06-07  1:53     ` Gautier write-only address
2022-06-07  2:35       ` Randy Brukardt
2022-06-07  8:07       ` Simon Wright
2022-06-08  7:14       ` Jerry
2022-06-09  8:21 ` Robin Vowels
replies disabled

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