override toString of Exception
Jacob Carlborg
doob at me.com
Sat Oct 20 12:43:21 PDT 2012
On 2012-10-20 18:42, David wrote:
> class BraLaException : Exception {
> this(string s, string f=__FILE__, size_t l=__LINE__) {
> super(s, f, l);
> }
>
> override string toString() {
> return "bar";
> }
> }
>
>
> when throwing this exception, I still get the stacktrace and not "bar",
> is it possible to change that behaviour?
Perhaps this function can help:
http://dlang.org/phobos/core_runtime.html#traceHandler
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list