Hello,

I have nested try...catch statements that I use for error handling. I was wondering if there was any way to clear an error so that if an exception is encountered in a nested try...catch statement.

I've tried Err.Clear(), Server.ClearError(), Context.ClearError() and none of these work.

Code:
 
Try 
   'do something 

   Try 
     'do something 

   Catch DefaultExc As Exception 
     Context.ClearError() 
     Server.ClearError() 
     Err.Clear() 

   End Try 

   'the code here does not get processed when an error is caught in the try...catch statement above 

Catch DefaultExc As Exception 
   'errors processed in the above catch statement always get processed here as 
   'well and I just want to clear the error in the first nested catch statement 

End Try