Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Ctx{
- public:
- void foo1(){
- depth++;
- foo2();
- depth--;
- }
- void foo2(){
- if ( something ){
- foo1();
- }else if ( something2 ){
- try{
- foo_try_this_one();
- }catch(Exception&){
- foo_backup(); // here the depth may become invalid
- }
- }else{
- ...
- }
- }
- void foo_try_this_one();
- void foo_backup();
- int depth;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement