lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master b518132 4/4: Remove the latent defect jus


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] master b518132 4/4: Remove the latent defect just added
Date: Fri, 7 Sep 2018 03:22:51 +0200

On Fri, 7 Sep 2018 00:45:38 +0000 Greg Chicares <address@hidden> wrote:

GC> I hope you'll find commit ad23b9ee less obtrusive.

 Now that I do see it, I can say that I absolutely find it a big
improvement, but, being what I am, still can't prevent myself from thinking
that it would be even better if we had a safe_denominator() function which
would really assert in case the precondition is not satisfied because IMO
this problem should be flagged as an assertion failure, i.e. a programming
mistake, and not just a run of the mill runtime_error because there is a
big difference between the former, which has to be fixed, and the latter,
which is unavoidable and just needs to be handled correctly.

 So at the very least I'd replace this runtime_error with logic_error. But
an assertion failure would be even more perfectly suitable here IMHO.

 Sorry for the continued nitpicking,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]