Handled vs non-handled exceptions (xamarin)

sahark

Posted on
Sep 06 2015

Hi, I am integrating raygun over xamarin client using the nuget dll. I use raygun to capture exception as well as manually sending exceptions via the ".send()" method provided by raygun. in the dashboard i find no option to filter and distinct between handled (reported using "send()" ) exceptions, and exceptions that are not.

Furthermore, I find that even in non-handled exceptions, not every line cause a crash. is there a way to distinct between exception reports that caused app crash and these that didn't? regards Sahar


Jason Fauchelle

Raygun

Posted on
Sep 07 2015

Hi sahark,

The best option here would be to add a tag to manually sent exceptions. This can be done using one of the Send method overloads. You could include a tag such as "Handled" so that you can distinguish between the 2 types. In the Raygun app, you can then filter by tags that equal or do not equal "Handled".

As far as I know, there isn't a way to detect if a crash is going to occur as a result of an unhandled exception. For unhandled exceptions that you know are not crashing the app, there is something you could try. Attach an event handler to the RaygunClient.SendingMessage event. In the handler, write code that detects the pattern of the exception(s) that do not crash the app. Then add a tag to the message object such as "Handled" or "No-crash" - anything you want. If you don't mind, I would like to know what exceptions are caught by the unhandled exception handler but not crashing the app.

We have thought about building in some kind of crash or no-crash indication on exception reports, but don't have immediate plans to implement this.

Let me know if you have further questions.

-Jason Fauchelle


sahark

Posted on
Sep 08 2015

I'm sure that "crash or no-crash indication" feature would give a tremendous value to app developers. would vote +1 for it :) thanks Sahar.


Reply