0

Hi guys is this possible to send a handled exception to HockeyApp SDK using Xamarin android ?

I am getting unhandled exceptions in HockeyApp SDK .

Can any one suggest some way to this problem.

the below code is one of my experiment. This is also not working

try
            {
                MetricsManager.Register(Application.Context, Application, "aca46d1941bd4891bb1ce2ab770e28a8");

                MetricsManager.EnableUserMetrics();
                int a = 10;
                int b = a / 0;
            }
            catch (Exception ex)
            {
                MetricsManager.TrackEvent(ex.ToString());
            }
Pranav MS
  • 2,235
  • 2
  • 23
  • 50

2 Answers2

1

If you might have seen how to do custom logging in hockey app the same can be done for handled exceptions, Something like this:

catch(Exception ex) {
 MetricsManager.TrackEvent(ex.Message);
 MetricsManager.TrackEvent(ex.Stacktrace);
 }

Also, I would suggest you check this out MSDN on HockeyApp in XF

Good luck!

In case of queries revert.

FreakyAli
  • 13,349
  • 3
  • 23
  • 63
  • I have tried it but it is not working. I can see the unhandled exceptions but it not registering the events.NOt able to see the handled exceptions – Pranav MS Sep 25 '18 at 09:49
1

HockeyApp does not support handled exceptions. If you are looking for handled exceptions support and specifically with Xamarin, take a look at HockeyApp's successor product App Center: https://learn.microsoft.com/en-us/appcenter/sdk/crashes/xamarin#handled-errors-in-xamarin

Lukas Spieß
  • 2,478
  • 2
  • 19
  • 24
  • My application is not deployed on AppCenter. So that i am only able to collect the report from HockeyApp . – Pranav MS Sep 27 '18 at 05:58