WPF Visual Studio not throwing the right exception
I searched the internet but could not find a suitable solution for my problem. The problem is the following: I have a wpf application which fires event in which i have some code:
string result = e.NewValue.ToString();
The problem was that visual studio threw me a 'System.Reflection.Invocation Exception' instead of NullReferenceException when e.NewValue was 'null开发者_StackOverflow社区'. The way I realized that there is something wrong with my visual studio was sending the whole solution to my friend and when he tried to do the same visual studio came up with a NullReferenceException and stopped at the right time. I have tried this to both of my computers - Home PC and a Laptop the result was the same on both of the machines. I really think that I messed up something with the settings but can you help me please because I don't get the real exception when working with WPF. Visual studio is 2010 and SP1.
You or the Telerik control might be catching and rethrowing a different exception somewhere else. Try this: Open Debug -> Exceptions and mark "Thrown" for CLR exceptions. This way you're telling the debugger to stop whenever an exception is thrown regardless it's handled or not.
精彩评论