PDA

Click to See Complete Forum and Search --> : Multiple Try Blocks


Rawther
Jun 16th, 2006, 04:41 AM
Is it Possible to have Multiple Try Blocks for Exception Handling

ComputerJy
Jun 16th, 2006, 05:41 AM
you can use
try
{
statement;
}
catch(SomeException1 ex1){}
catch(SomeException2 ex2){}
catch(Exception ex){}
Or this: try
{
try{}
catch{}
}
catch{}
I'm sure there are other ways, so yes you can

mendhak
Jun 16th, 2006, 02:17 PM
Is it Possible to have Multiple Try Blocks for Exception Handling
Why do you want to do this? Don't do it if it isn't necessary, it's a little expensive.