The Right Approach to Exceptions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Feb 19 08:50:36 PST 2012


On 2/19/12 10:43 AM, Jacob Carlborg wrote:
> No it's not. Say you want to save a file. You're saving it in "/" which
> you don't have permission to write to. The system throws an exception
> PermissionException, this is a recoverable exception since the
> application could prompt the user to save the file in a different location.

That would be a retry with different state. I agree you could define 
transiency/recoverability differently, but I think my definition is more 
useful. This is because it provides a notion of transiency that can be 
handled regardless of the actual problem.

Andrei




More information about the Digitalmars-d mailing list