Fatal exceptions handling on Android

Hello there!

I’m coming with another plea for help :stuck_out_tongue:. Can someone share with us how to properly catch fatal exceptions in Monogame 3.3 on Android platform? By fatal errors I mean exceptions unhandled by game code which cause application termination.

The point of catching them is of course to log everything to file. On Windows I simply done it like this:

using (var game = new AdventureGame())
        {
            try
            {
                game.Run();
            }
            catch (Exception e)
            {
                //log to file
            }
        }

Thanks! I’m not really familiar with proper handling of android Activity yet…

Hi,

this is more a Xamarin issue than a MonoGame issue. This may help: https://forums.xamarin.com/discussion/13784/catching-global-exceptions-in-android

I think this is all that I’ve needed for that matter, thanks ! :smile: