bearophile wrote:
> This is bad code, I didn't even know D supports empty catch:
>
>
> http://pspemu.googlecode.com/svn/trunk/src/pspemu/utils/Expression.d
>
> static long parseString(string s, long default_value = 0) {
>     if (s.length > 0) {
>         try {
>             ...
>         } catch {
>         }
>     }
>     return default_value;
> }

That he is using an empty catch is actually not too bad compared to the fact 
that
what he intends to catch is an AssertError from the preceding function, which is
an actual bug, not just bad practice.

Reply via email to