Checked vs unchecked exceptions
Sebastien Alaiwan via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 26 09:52:22 PDT 2017
On Monday, 26 June 2017 at 16:35:51 UTC, jmh530 wrote:
> Just curious: how are checked exceptions different from setting
> nothrow as the default? Like you would have to write:
>
> void foo() @maythrow
> {
> functionWithException();
> }
>
> So for instance, you could still use your "//shut up compiler"
> code with the nothrow default.
Checked exceptions allow a lot more precision about what types of
exceptions a function can throw.
More information about the Digitalmars-d
mailing list