Can we make Throwable an interface?

Lars T. Kyllingstad via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 10 23:26:57 PST 2014


On Tuesday, 9 December 2014 at 18:00:05 UTC, Sean Kelly wrote:
> All the stack tracing stuff is wired through Throwable, so some
> duplication may need to occur if it were changed to an 
> interface.

I can think of two ways to solve this:

1. rename the current Throwable (to e.g. ThrowableBase) and make 
it inherit the new Throwable interface.

2. Move the relevant functionality to a mixin template that is 
used in a limited set of base exception classes.

Lars


More information about the Digitalmars-d mailing list