SHARE
TWEET

Untitled

tinyevil Nov 5th, 2018 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Ctx{
  2. public:
  3.     void foo1(){
  4.         depth++;
  5.         foo2();
  6.         depth--;
  7.     }
  8.  
  9.     void foo2(){
  10.         if ( something ){
  11.             foo1();
  12.         }else if ( something2 ){
  13.             try{
  14.                 foo_try_this_one();
  15.             }catch(Exception&){
  16.                 foo_backup(); // here the depth may become invalid
  17.             }
  18.         }else{
  19.             ...
  20.         }
  21.     }
  22.  
  23.     void foo_try_this_one();
  24.     void foo_backup();
  25.  
  26.     int depth;
  27. };
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