How to avoid throwing an exceptions for a built-in function?
Stanislav Blinov via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 10 07:27:46 PDT 2017
On Wednesday, 10 May 2017 at 13:27:17 UTC, k-five wrote:
> Thanks, but I know about what are you saying. The user_apply[4]
> has so many possibilities and I cannot use if-else
That doesn't sound right. Either you've already handled all the
possible cases and thus expect the to! to not throw (can specify
that i.e. via std.exception.assumeWontThrow), or, as you're
saying, it's much more than an if-else, but in that case
exception will be thrown on invalid input.
More information about the Digitalmars-d-learn
mailing list