Exceptions in @nogc code
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 5 05:07:03 PDT 2017
On Wednesday, 5 April 2017 at 09:48:47 UTC, Walter Bright wrote:
> try { ... }
> catch (owned Exception e) { ... }
> catch (scope Exception e) { ... }
> catch (Exception e) { ... }
>
> It not look enticing.
You can do that, but that's 100% equivalent to:
> try { ... }
> catch (scope Exception e) { ... }
Unless you want to do something specific with the owned case ?
You seems to be under the impression that this does anything
specific for catch/throw when it doesn't.
Today, you can do
try { ... }
catch(immutable(Exception) e) { ... }
There is nothing different here.
More information about the Digitalmars-d
mailing list