For a bit of a joke (about 6 months ago), I changed the exceptions file on a colleagues PC so that when a NullReferenceException
was thrown, he would get a funny Trouble Shooting Tip with a reference to him - We have a joke about him chopping up in his basement...
After forgetting about this, and now 6 months on, this error has arisen, whilst yes it's funny, it also needs to be fixed and changed back.
Any ideas how I'd change it back? Or what file it should be? All my googling seems to point to File Exceptions..
(For that wondering how it looked...)
With a solution open in Visual Studio, use Debug > Windows > Exception Settings to open the Exception Settings window.
Note: you can uncheck Break when this exception type is thrown directly in the exception handler and continue debugging (press F5 ). Visual Studio will add this exception type to the Exception settings and will remember that it shouldn't break on this exception again.
The file containing the custom troubleshooting tips for VS2012 is:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ExceptionAssistantContent\1033\DefaultContent.xml
This is what the NullReferenceException
block should look like:
<Exception>
<Type>System.NullReferenceException</Type>
<Tip HelpID="EHNullReference">
<Description>Use the "new" keyword to create an object instance.</Description>
</Tip>
</Exception>
<Exception>
<Type>System.NullReferenceException</Type>
<Tip HelpID="EHNullReference">
<Description>Check to determine if the object is null before calling the method.</Description>
</Tip>
</Exception>
Kudos for the prank, I'll have to remember that one!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With