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).
Cooler Master MasterFrame 600 PC case is now 33% off on Amazon by Ivan Jenic
The Cooler Master MasterFrame 600 is currently $109.99 on Amazon, down from its original $164.99 list price. That's 33% off and $55 saved on this premium aluminum mid-tower case with a modular design.
If you're upgrading your PC case and want something that doesn't force you into a rigid layout, the MasterFrame 600 is worth a look. The case is built around the Cooler Master's FreeForm 2.0 platform, which lets you reconfigure the internal structure according to your hardware. Magnetic side panels allow for straightforward adjustments, and the case supports everything from Mini-ITX to E-ATX motherboards without compromise.
There's also generous cooling headroom. Four pre-installed PWM fans handle airflow out of the box. GPU clearance goes up to 410mm, and the case supports radiators up to 420mm with room for three simultaneously.
Truth be told, this might not be the prettiest case on the market, but it’s highly functional. The aluminum construction keeps the whole thing lightweight despite its size, and the finish looks noticeably better than the plastic mid-towers competing at this price point.
If you want a serious, flexible case that prioritizes function over flashy aesthetics like RGB lighting, the MasterFrame 600 delivers at a reasonable price.
Cooler Master MasterFrame 600 - $109.99 | 33% off on Amazon
This Amazon deal is US-specific and not available in other regions unless specified. This is a first-party seller link (at the time of article publishing); ensure that you also purchase from a first-party seller link only.
If you don't like it or want to look at more options, check out the previous deals that we have covered, OR you can also visit Amazon US deals page.
Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days.
As an Amazon Associate, we earn from qualifying purchases.
Your daily driver? Weird, seeing that you don't seem to understand how your own browser downloads and installs its updates. What you posted earlier is factually incorrect...
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