recover from exception on iOS and macOS using signals and log the stacktrace
This commit is contained in:
@@ -11,22 +11,6 @@
|
||||
#include "app.h"
|
||||
#include <WTSonarPenDriver.h>
|
||||
|
||||
void global_exception_handler(NSException* e)
|
||||
{
|
||||
if (App::I.canvas && App::I.canvas->m_canvas)
|
||||
App::I.canvas->m_canvas->project_save_thread(App::I.data_path + "/recovery.ppi");
|
||||
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
void global_signal_handler(int e)
|
||||
{
|
||||
if (App::I.canvas && App::I.canvas->m_canvas)
|
||||
App::I.canvas->m_canvas->project_save_thread(App::I.data_path + "/recovery.ppi");
|
||||
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
@interface AppDelegate () {
|
||||
GameViewController* view;
|
||||
WTSonarPenDriver* sonarpen_driver;
|
||||
@@ -68,8 +52,6 @@ void global_signal_handler(int e)
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
// Override point for customization after application launch.
|
||||
NSSetUncaughtExceptionHandler(&global_exception_handler);
|
||||
// sonarpen_driver = [[WTSonarPenDriver alloc] initWithApplication:application];
|
||||
// [sonarpen_driver start];
|
||||
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(penStatusChanged) name:WTSonarPenDriverStateChangedNotification object:nil];
|
||||
|
||||
Reference in New Issue
Block a user