Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

I'm trying to make sense out of some old junk I've got thrown into my lap. The problem with this code is that it seems like the original dev just threw in a try/catch wherever the code failed, and it's just impossible to find where some of these exceptions occurred. Is there any way to quickly go to the statement that resulted in the exception?

Cheers!
Posted

In the Debug | Exceptions dialog, you can specify how exceptions should be treated by the debugger. You can chose to break into the debugger when a specific exception is thrown.

So if you know what type to look for, that could be one way of doing it.
 
Share this answer
 
Comments
Sandeep Mewara 17-Aug-10 12:57pm    
Comment from OP: Thanks - will try that next time something crops up
Thanks - will try that next time something crops up :)
 
Share this answer
 
Comments
Nyarost 17-Aug-10 8:47am    
Dunno if this is possible in C# but in Java you can use getStackTrace() on exception object. So you can create one global try/catch :D and use this thing on it ;)
Sandeep Mewara 17-Aug-10 12:58pm    
Reason for my vote of 1
Not an answer. Looks like a comment to an answer. Use 'Add Comments' feature for that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900