Error derived from Exception is WRONG, DAMNIT

Sean Reque seanthenewt at yahoo.com
Sat Mar 1 22:42:23 PST 2008


> also, I think that the global "Exception" class should come with tracing
> enabled by default. why would anyone need an exception mechanism without
> tracing?
> 

This is an excellent idea! One of my favorite features of D is conditional compilation. With it, you can take advantage of all the high-level debugging tools available in other languages in debug mode, and compile them out in release. And there isn't a debug tool I probably use more than a simple stack trace of where the error occured. 

Adding this feature to D would make it a lot friendlier to others used to 4th generation languages. In my first class where I learned C, the teacher failed to teach us anything about debuggers. All i knew at the time was Java, and when I first read the words "Segmentation Fault" I stared back with utter horror. Where was my stack trace? Fortunately, since then I learned how to use GDB with the best of them. However, If D provided a default stacktrace of errors in debug mode, then inexperienced systems programmers wouldn't have to go through as much heartache, and the rest of us would save ourselves from having to use a debugger quite so often.





More information about the Digitalmars-d mailing list