try
{
Application.Run(new Form1());
}
catch (Exception e)
{
//report exception to server
Through visual studio, the above catch block is actually invoked. (I'm using it for error reporting back to my site, to fix problems and such).
But when I run the standalone exe, the exception is thrown into .NET's exception handling mechanism, and thus is never caught by my try catch block. It mentions JIT (just in time debugging), but I don't know if it has to do with it.
Is this the right way I should be doing this? It makes sense and works through Visual Studio, but not as standalone (which I need).
Now disable that stupid OneDrive backup request when Windows starts please. So unbelievably frustrating to only have “remind me later” instead of “no and never ask me again”
That's just silly imo. The lengths that man goes to just to avoid W11 is just nuts. Very, very few home users would do that. I will say this though, he is committed.
Btw, I note on askwoody that Woody Leonhard passed away March, 2025 aged 73. His site was one of my favorites back in the day. Belated yes but RIP Woody.
Because of the EU (a good thing) newer android devices been getting 5 years worth of security patches. Except some Motorola which found the loop hole, and offer ZERO updates. In addition, Google for years have been making where it can patch some stuff by updating the core Google Play Store itself.
As echoed earlier, you take the security risk in to your own hand beyond supported.
Question
zackiv31
try { Application.Run(new Form1()); } catch (Exception e) { //report exception to serverThrough visual studio, the above catch block is actually invoked. (I'm using it for error reporting back to my site, to fix problems and such).
But when I run the standalone exe, the exception is thrown into .NET's exception handling mechanism, and thus is never caught by my try catch block. It mentions JIT (just in time debugging), but I don't know if it has to do with it.
Is this the right way I should be doing this? It makes sense and works through Visual Studio, but not as standalone (which I need).
Link to comment
https://www.neowin.net/forum/topic/619252-c-catch-application-exception/Share on other sites
7 answers to this question
Recommended Posts