Is it possible to remove or disable these errors? Ie, that they would not be displayed, but the application was simply closed. Is this possible? Example error: Click
Asked
Active
Viewed 53 times
0
-
1How about fixing the application so that it crash? – Lasse V. Karlsen May 31 '18 at 20:38
-
4Sure, use a try/catch or fix the exceptions. – May 31 '18 at 20:41
-
@Amy beat me by 7 seconds. – Lews Therin May 31 '18 at 20:42
-
@DourHighArch Given how they asked this question, I don't think it's a duplicate. The OP doesn't want to fix the `NullReferenceException`, they just want to close the application when one is thrown. – Lews Therin May 31 '18 at 20:43
1 Answers
1
You would need to wrap the code that is generating this exception in a try...catch
block and close the application in the catch
.
See this article for more information about handling exceptions in .NET.

Lews Therin
- 3,707
- 2
- 27
- 53