From 7127f31095466e1911166eabcc303a5a43103f87 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 31 Jul 2023 12:04:08 -0400 Subject: [PATCH] v2.2.0: attempted to improve some aspects of iOS crash reporting --- .../shatteredpixeldungeon/ios/IOSLauncher.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ios/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ios/IOSLauncher.java b/ios/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ios/IOSLauncher.java index 35615acd2..3729b3de1 100644 --- a/ios/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ios/IOSLauncher.java +++ b/ios/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ios/IOSLauncher.java @@ -38,7 +38,6 @@ import com.watabou.utils.FileUtils; import org.robovm.apple.coregraphics.CGRect; import org.robovm.apple.foundation.NSAutoreleasePool; import org.robovm.apple.foundation.NSBundle; -import org.robovm.apple.foundation.NSDictionary; import org.robovm.apple.foundation.NSException; import org.robovm.apple.foundation.NSMutableDictionary; import org.robovm.apple.foundation.NSObject; @@ -57,11 +56,7 @@ public class IOSLauncher extends IOSApplication.Delegate { protected IOSApplication createApplication() { //ensures the app actually crashes if there's an error in the mobiVM runtime - Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { - public void uncaughtException(Thread thread, Throwable ex) { - new NSException(ex.getClass().getName(), ex.getMessage(), new NSDictionary()).raise(); - } - }); + NSException.registerDefaultJavaUncaughtExceptionHandler(); try { Game.version = NSBundle.getMainBundle().getInfoDictionaryObject("CFBundleVersionString").description();