I had a “swearing at Microsoft” moment at work. I was using the .NET XmlSerializer class.
The XmlSerializer class throws an exception when you instantiate the class! Even if there are no bugs in your code! The constructor throws and catches and exception!
Why does this matter? I had my code set to “break on all exceptions”, causing a breakpoint to be hit at that exception.
What kind of idiot designs a class that throws an exception AS PART OF NORMAL BEHAVIOR? Shouldn’t someone in QA somewhere catch this?