.net - Exception that gets caught for some reason bubbles up to another catch block -


we have unusual case, try-catch block inside try-catch block. both catch clauses catch exception type of exceptions. error occurs in inner try-catch block, gets caught byt first catch empty , instead of moving next line, gets caught time other catch. have never seen before. 1 of our colleagues claims setting not remember kind of setting. know why happening , how "turn off"? please find code below:

    try {         //some code                                         try         {                //code throws exception                                     }         catch (exception)         {         }          //some other code, never reached          }      catch (exception ex)      {            logger.write(ex.tostring());            return null;      } 

one thing causing first catch block throwing exception. cause second 1 triggered.

your colleague may referring exception catching functionality of visual studio allows break on exceptions including ones have been handled. can find pressing ctrl + alt + e, or in menus it's listed under debug --> extensions...

if neither of case we'll need more code


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -