multi catch

Moritz Warning moritzwarning at web.de
Sat Jul 26 03:17:10 PDT 2008


On Sat, 26 Jul 2008 05:07:20 -0400, Zarathustra wrote:

> How to create few catches?
> for example:
> try{
>   ...
> }
> catch(Object o){
>   ...
> }
> catch(Exception e){
>   ...
> }

The syntax is ok, but catch(Exception) is never reached.
because Object will also match Exceptions.
I think the compiler will argue about that.


More information about the Digitalmars-d-learn mailing list