Re: custom exception type

2010-10-22 Thread vano
Although it is somewhat annoying that there is no default value for the msg parameter in the first constructor, it is pretty easy to use the mixin templates to overcome the issue: public mixin template ExceptionCtorMixin() { this(string msg = null, Throwable next = null) { super(msg,

Destruction Sequence: module and classes defined within

2010-10-05 Thread vano
The code below: module used; import std.stdio; class ClassA { this() { writeln(A ctor); } ~this() { writeln(A dtor); } } static this() { writeln(used.sctor); } static ~this() { writeln(used.sdtor); } void main() { auto a = new ClassA();