Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Deal With the “Unspecified Error” in a Windows Phone Application

DZone's Guide to

How to Deal With the “Unspecified Error” in a Windows Phone Application

· Mobile Zone
Free Resource

Get gorgeous, multi-touch charts for your iOS application with just a few lines of code.

While developing and testing a Windows Phone application you may have to deal with a really annoying problem: your application crashes and the only error reported by Visual Studio is a generic Unspecified error.

Visual Studio itself isn’t of any help, because the error is intercepted by the global error handler available in the App.xaml.cs file, so you don’t have a way to understand where exactly the problem occured.

The solution is easy to understand, even if it’s not easy to find: this error is raised usually when your XAML contains a property with an invalid value. For example, when I had to deal with this error I found that, by mistake, the Margin property of a control contained the value 0k, 0, 0, 15, that is obviously not correct (the margin property accepts only numeric values).

To help understanding where your application may contain such an error, keep track of the the time when Visual Studio intercept the “Unspecified error” exception: usually, this error is raised only when you navigate towards a page that has this problem.

Good debugging!

.Net developers: use Highcharts, the industry's leading interactive charting library, without writing a single line of JavaScript.

Topics:

Published at DZone with permission of Matteo Pagani, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}