The Right Approach to Exceptions

Andrei Alexandrescu SeeWebsiteForEmail at
Tue Feb 21 06:16:57 PST 2012

On 2/21/12 5:11 AM, Jacob Carlborg wrote:
> On 2012-02-21 03:34, Andrei Alexandrescu wrote:
> I think the correct way of handling this is provide enough information
> in the exception so a message can be built where the exception is
> caught.

Quite so. I'd add "using a unified interface so reusable code can work 
with heterogeneous concrete exceptions".

> It might happen the you want to catch the same exception in
> different parts of the code and build different messages.

Yah, that's different string tables.


More information about the Digitalmars-d mailing list