On iOS, I enable Fast but No Exceptions, and Silent Exit, and then the above callback is triggered as expected. On Android, the callback is never called.
How do I get it to work?
I need the app to crash on uncaught exceptions, just like iOS.
Not on iOS, and it doesn’t have to on Android either.
When my app throws an exception, for which I haven’t explicitly written code to recover from, then my app ends up in an invalid state. This leads to user-data corruption in many cases.
Then it should be fixed, because not everyone wants their app to continue limping along in an invalid state when an uncaught exception happens. This behaviour is fine in editor, but not for release mode.
To be honest, the 99999 other feature suggestions are very discouraging. It would be nice if there was some kind of fast track for things that were either important, or in this case, trivial to implement.
I suppose I will do the feature request, but to be honest, I seems naive to think it will get done within the next two years, if at all, or before someone at UT has simply had a stroke of genius on their own.
I am also very active in bug or feature request reporting. With features, the usual reply i get is “report this to the feedback.unity3d.com site”. That site is a nice idea, but i don’t think it gives a right indication of what feature most people want or what is important enough to developers.
I mean that the following function will get called when I throw an exception from the callback of a unity UI button(the new UI), but that this function never gets called if I throw an exception from Update() of a MonoBehavior.
I’m using it for now, but all you get is Unity’s pre-formatted message, instead of the exception itself.
Also, I’m using Process.GetCurrentProcesss().Kill() to kill the process upon receiving the callback, but I don’t think there is any guarantee that Application.logMessageReceived will be called immediately upon the exception being thrown, and before any other script code has been allowed to run.
I went down this rabbit hole just now. Any luck with this? I’d like the UnhandledException to be properly used on Android too. As mentioned earlier, I can’t believe there’s no option for this considering it’s trivial.