c# – How do I stop Visual Studio 2022 from breaking on CAUGHT exceptions?
My C# project has a try/catch block that catches System.InvalidCastException.
try
{
dateTimePicker.Value = Convert.ToDateTime(dataGridViewCell.Value.ToString());
}
catch(System.InvalidCastException e)
{
dateTimePicker.Value = DateTime.Today;
}
Visual Studio always breaks when this exception is thrown. It bizarrely says “Exception Caught” in the exception pop-up window.
I have tried unchecking System.InvalidCastException in the Exception Settings, to no avail. I’ve also tried restarting. How do I stop Visual Studio from breaking on any caught exceptions?
Read more here: Source link


