private void OnInitCallback() { // If/else outside of try-catch to separate user-unhandled exceptions properly var unhandledException = game.UnhandledExceptionInternal; if (unhandledException != null) { // Catch exceptions and transmit them to UnhandledException event try { game.InitializeBeforeRun(); } catch (Exception e) { // Some system was listening for exceptions unhandledException(this, new GameUnhandledExceptionEventArgs(e, false)); game.Exit(); } } else { game.InitializeBeforeRun(); } }
private void OnInitCallback() { game.InitializeBeforeRun(); }