c# - Unhandled exception not caught by `Application.ThreadException`? -


we have big application, , ensure our customers don't have message "xxx has stopped working", added handler(in logs errors , other stuff).

it working fine, solved lot of issues this(by analysis logs after exception arrived). recently, managed "xxx has stopped working" message anyway.

currently have following implementation:

application.threadexception += handleunhandleexception; application.setunhandledexceptionmode(unhandledexceptionmode.catchexception); appdomain.currentdomain.unhandledexception += handleunhandleexception; 

which done @ beginning of our application.

my question: see case can have exception display mentionned popup("xxx has stopped working") without coming in handler?

what mean "the start of our application"?

i have found on rare occaision, appdomain , application handlers can still fail in main function. 1 workaround put them in static constructor of same class entry point, preempts main.

some exceptions cannot caught, such obvious stack overflow, prevent catching , logging happening. can happen if program enters infinite recursive loop.

see question on list of exceptions can't caught in .net may shed more light on that.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -