restriction in finally no catch

BCS BCS at pathlink.com
Mon Oct 9 09:49:21 PDT 2006


Frank Benoit wrote:
> Actually DMD has the restriction, that a catch in not allowed within a
> finally block.
> 
> A very simple workaround:
> 
[...]

another option:

  try
  {
  }
  catch( Exception e)
  {
  }
  finally
  {
	// delegate literal
    (){
      try
      {
      }
      catch( Exception e)
      {
      }
    }();	// called directly
  }



More information about the Digitalmars-d mailing list