Xamarin.Mac - Raygun not picking up some exceptions?

TobyLobster

Posted on
Aug 14 2017

Enclosed is a simple example Xamarin.Mac project that crashes with an unhandled NSTableViewException, but which does not seem to be caught by Raygun.

In contrast, Raygun does correctly report an exception if I throw an exception myself, e.g. throw ArithmeticException; so I know I have initialised the library with the correct key.


Jason Fauchelle

Raygun

Posted on
Aug 16 2017

Hi Toby,

Thanks for the repro project. The reason why this exception does not appear in your Raygun dashboard is because it happens to be a native crash. Our Xamarin.Mac provider currently is only able to report managed .NET exceptions.

Capturing native Mac exceptions within the managed Raygun4Net.Xamarin.Mac provider would be possible if we bind our native Mac provider into it. We did this for our Xamarin iOS provider for example which worked well. I'm not sure when we would implement this binding sorry. Feel free to add this to our feature requests forum, I think you're the first one to request it: https://raygun.com/thinktank/forum/2

It is possible for you to implement the binding too - I know a customer did this with our Xamarin.Android provider. Our native mac provider can be found here: https://raygun.com/docs/languages/macos

Native exceptions are usually quite rare within a Xamarin app. They most commonly occur when you bind in other native assemblies into your app. Or otherwise they occur when Xamarin.Mac doesn't surface an issue as a managed exception such as what you've come across.

Let me know if you have further questions about this.

-Jason Fauchelle


Reply