How to mask all errors after the program is closed

99 views Asked by At

I use C# and Halcon to do image processing, now there is a problem that I halconwindow on some operation, users need to click the mouse operation, but this time the user without any operation will turn off the program, or just click the left mouse button and click the right mouse button. This time turn off the program, the program will wait for the closure. Debugging in vs debug, you will see the error caused by memory corruption. Now how to mask this error? Or let the user can not see the waiting for the closure of the interface.

1

There are 1 answers

1
Theo On

Use a try catch block to catch the specific exception you are seeing. Doing nothing in the catch block will effectively hide it.