Our Blog

How to deal with Silverlight general exception message?

Stefan Stefanov
by Stefan Stefanov on Thu 17 January 2013 No comments

Figure 1

How often your Silverlight application throw an exception with general message “An exception occurred during the operation, making the result invalid. Check InnerException for exception details” (Figure.1) and your Visual Studio is not running or is run in “Start Without Debugging” and the application does not have an error log module? I suppose happens to any Silverlight developer quite often. The worse situation is when the clients report – “The application just crashed while I was working on something.” and attaches the screenshot with the error which means nothing and you don’t know what exactly to start investigating.

It is quite complex and difficult to understand what actually happened. For the developer sometimes it is more important to have an answer to the question “where” instead of to “what”. Here comes the developer’s tool of the browser (for example IE). If the console window is turned on while testing Silverlight application and the app throws an exception, the Console should handle the thrown error and displays it (Figure 2).

Figure 2

If you look at the details in the console content, you see that in addition to the general error message there is an appended exception’s stack trace. Exactly what you need!
You can ask your users how to save the exception stack trace from the developer tool console and describe the error scenario – not so difficult so almost any user can do that after some quick training. These are very helpful items for a developer to debug and fix the problem. Not always this will be enough but still better than nothing.

Stefan StefanovHow to deal with Silverlight general exception message?

Related Posts

Take a look at these posts

Join the conversation