Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stopping "not handled in user code" dialog for exception type

Within visual studio I get an dialog saying something like

"An exception of type XXX occurred in YYY.dll but was not handled in user code"

and pausing my code. Is there a way in VS2013 of suppressing this just for this one exception type (this is for a custom exception)?

like image 668
Nick Tucker Avatar asked Oct 22 '25 11:10

Nick Tucker


1 Answers

Yes, handle the exception.

Either:

  • fix the issue (like in the case of an ArgumentNullException or IndexOutOfRangeException);
  • or if it is something you could expect: use a try...catch block (like internet being down causing an exception).

If you want to disable messages on handled exceptions, you can set when if Visual Studio breaks on a specific exception in the Debug > Exceptions dialog. Then uncheck Thrown for your specific exception.

like image 163
Patrick Hofman Avatar answered Oct 25 '25 02:10

Patrick Hofman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!