SHARE
TWEET

Untitled

a guest Sep 18th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. try {
  2.  
  3.   DoSomethingRisky();
  4.  
  5. } catch (InvalidOperationException ex) {
  6.  
  7.   if (ex.Message.StartsWith("Cannot access the")) {
  8.      // Some specialized handling logic
  9.   } else {
  10.      throw ex; // We don't have a specific solution for this. Rethrow it (Don't do this)
  11.   }
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top