Unreachable statement, do or do not, there is no try

Idan Arye via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 12 00:45:54 PST 2015


On Tuesday, 10 February 2015 at 20:37:16 UTC, Walter Bright wrote:
> On 2/9/2015 11:07 PM, deadalnix wrote:
>> On Tuesday, 10 February 2015 at 07:01:18 UTC, Jacob Carlborg 
>> wrote:
>>> DMD will complain about the second example if warnings are 
>>> enabled.
>>
>> Ok I think that answer the question.
>
> The thing is, you can still catch an Object, so catching 
> Exception won't quite catch them all.

Why does it matter in that example? If a non-Exception Throwable 
is thrown the return after the try..catch will still not be 
reached.


More information about the Digitalmars-d mailing list