restriction in finally no catch

Frank Benoit keinfarbton at nospam.xyz
Mon Oct 9 08:29:51 PDT 2006


Actually DMD has the restriction, that a catch in not allowed within a
finally block.

A very simple workaround:

try{
}
catch( Exception e){
}
finally(
  void block(){
    try{
    }
    catch( Exception e){
    }
  }
  block();
}

This is OK for the compiler.
I don't know the reason for this restriction, but
isn't it possible to get rid of it?



More information about the Digitalmars-d mailing list