Visual Studio App Center is the next generation of Xamarin Insights and HockeyApp! Read the blog post.

Allowing an Exception and Reporting Additional Information

PDF for offline use
Related Links:

Let us know how you feel about this

Translation Quality


If we wish to allow a given exception to still be thrown but still want to add additional information to the report, we can use the Exception.Data property.

The code snippet below shows an example of how to do this:

try {
catch (Exception exception) {
    exception.Data["AccountType"] = "standard";

Here we've used a key/value pair to add the additional information and used the throw method to allow the exception to continue.

Disabling Uncaught Exception Reporting

There might be situations where we do not wish to send uncaught exceptions (outside of a try/catch block) to the Xamarin Insights service. In those situations, add the following line to your application:

Insights.DisableExceptionCatching = true;

With this property set, no exception that occurs outside of a try/catch block will be logged.

If you have disabled automatic exception handling, you can add the following line to your own unhandled exception handler to send the exception information on to Xamarin Insights:


Note: The Save() method is not intended for regular Insights use. Use it only in the situation where you have disabled automatic exception handling and still want to send unhandled exceptions to Insights after you have done your own processing.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.