The Right Approach to Exceptions

deadalnix deadalnix at gmail.com
Tue Feb 21 12:53:29 PST 2012


Le 21/02/2012 01:38, Andrei Alexandrescu a écrit :
> On 2/20/12 6:25 PM, H. S. Teoh wrote:
>> On Mon, Feb 20, 2012 at 05:15:17PM -0600, Andrei Alexandrescu wrote:
>> Formatting should use class reflection. We already discussed that, and
>> we already agreed that was the superior approach.
>
> Jose's argument convinced me otherwise. I retract my agreement.
>
>> When you're catching a specific exception, you're catching it with the
>> view that it will contain precisely information X, Y, Z that you need to
>> recover from the problem. If you don't need to catch something, then
>> don't put the catch block there.
>
> That's extremely rare in my experience, and only present in toy examples
> that contain a ton of "..." magic.
>

I think you experience here is biased by C++ .


More information about the Digitalmars-d mailing list