15-Jun-2014 02:03, Element 126 пишет:
On 06/14/2014 09:04 PM, Dmitry Olshansky wrote:
Recalling the previous discussion of throwing exception being costly, I
thought the idiom of pay as you go is worth incorporating into the
standard library.
In brief:
throw exception(CPU temperature is
On 2014-06-15 11:40, Dmitry Olshansky wrote:
No, normal exceptions print just fine. e.g.
writeln(new Exception(abc));
I'm wondering what's wrong the one I defined, the error message seems to
indicate that it doesn't have toString. It's wrong as there is one
derived from Exception.
Workaround
On 06/14/2014 09:04 PM, Dmitry Olshansky wrote:
Recalling the previous discussion of throwing exception being costly, I
thought the idiom of pay as you go is worth incorporating into the
standard library.
In brief:
throw exception(CPU temperature is below, 2.5, K);
vs
throw new