Exception style

Sean Campbell via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 25 02:37:51 PDT 2014


i know you can use both
throw new Exception(msg);
and

module test;

class testException {
      this (string msg) {
           super("some error info : "~msg);
      }
}

throw new testException(msg);

but which one is better conforms to the d style?


More information about the Digitalmars-d-learn mailing list