Shagohad
Shagohad

Reputation: 395

Visual Studio 2015 throw exception in Try Catch block

Visual Studio 2015 always throw exception in debug mode, even if error is handled in Try Catch block, which is very annoying. Could You tell me why is this happening? I dont know how to switch this off..

Upvotes: 3

Views: 3276

Answers (2)

Bruno Belmondo
Bruno Belmondo

Reputation: 2357

Go to Exception Settings (Ctrl+Alt+E on my visual studio) and tick or untick the kind of exception you want to break on when they are thrown.

Edit explanation When you run in debug mode, Visual Studio believe that notifying when an exception is raised is a good way to help the developper. Even if the exception is caught. The Exception Settings allows you to change this behaviour by choosing what the kind of exception should be notified or not.

Upvotes: 13

Paweł Słowik
Paweł Słowik

Reputation: 308

You have enabled first chance exception handling.

To disable it open Debug->Windows->Exception Settings and uncheck the exceptions you don't want to break the debugging when thrown. Check the link for more details.

Upvotes: 1

Related Questions