[phobos] Printing exceptions

Sean Kelly sean at invisibleduck.org
Wed Apr 7 08:29:58 PDT 2010


The runtime can do one of two things: print exceptions according to a standard format and inject the msg field in the proper place or it can call toString.  Which should be done?  I prefer the former because it makes for a standard presentation and doesn't risk allocating memory needlessly, but I can see how people might do fancy stuff in toString that they expect to be used instead.  This came up because I'm adding a default stack trace handler, and the current behavior prints the stack trace twice, so something needs to change.


More information about the phobos mailing list