How to find an ignored exception

Probably staying late to fix a few bugs today, but maybe SO can help me. Does anyone know if there is a way to "track" where some ignored exceptions are happening?

Basically I find some System.OverflowExceptions in System.Drawing that cause some graphs to not draw (red XX syndrome).

The problem is that I can only say this from the Debug window, and I cannot have my life find where it is being thrown. I guess the coder where this is happening wrote

try {something} finally {blah}

or...

try {something} catch {// Blah blah blah}

If I'm SOL as far as possible, maybe someone can know what methods in System.Drawing can cause StackOverflow to drop ...

Thank!

+2


source to share


2 answers


You can configure the debugger to break the exception even if it has been handled.

You can customize the behavior via Debug -> Exceptions .... In your specific case, you should check Debug -> Exceptions ... -> Common Language Exceptions -> System -> System.OverflowException:



alt text
(source: scatterbright.com )

+8


source


You might be able to use FxCop / StyleCop to get what you want . I'm not sure if you need a custom rule to find the try / finally script.



0


source







All Articles