[phobos] Exception chaining

Jonathan M Davis jmdavisProg at gmx.com
Tue Jan 11 16:03:07 PST 2011


On Tuesday, January 11, 2011 15:50:52 Andrei Alexandrescu wrote:
> I don't think that's helpful. It complicates the flow a lot because now
> understanding how the program acts depends not on the types anymore, but
> on what happens dynamically. Makes it more difficult, not easier, to
> write robust code.
> 
> If I throw a FileException, I must catch a FileException with
> catch(FileException) regardless of what collateral exceptions have
> happened.

I agree as long as it's other Exceptions that have been thrown. But Errors? 
Aren't they typically supposed to kill your program?

- Jonathan M Davis


More information about the phobos mailing list