private static void OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
 {
     ErrorReporting.ReportException(e.Exception);
     DialogService.ShowMessageBox(
         "Unexpected exception. Sorry about that.\r\nPlease Ctrl+C to copy this text and file an issue at https://github.com/KirillOsenkov/MSBuildStructuredLog/issues/new\r\n\r\n" + e.Exception.ToString());
     e.Handled = true;
 }
Esempio n. 2
0
    public void PumpSystemEvents()
    {
        system_events_processed_time = TimePoint.Now;

        Tig.MessageQueue.Enqueue(new Message(MessageType.UPDATE_TIME));

        try
        {
            Tig.Keyboard.Update();
        }
        catch (Exception e)
        {
            if (!ErrorReporting.ReportException(e))
            {
                throw;
            }
        }

        try
        {
            Tig.Mouse.AdvanceTime();
        }
        catch (Exception e)
        {
            if (!ErrorReporting.ReportException(e))
            {
                throw;
            }
        }

        try
        {
            ProcessWindowMessages();
        }
        catch (Exception e)
        {
            if (!ErrorReporting.ReportException(e))
            {
                throw;
            }
        }

        try
        {
            Tig.Sound.ProcessEvents();
        }
        catch (Exception e)
        {
            if (!ErrorReporting.ReportException(e))
            {
                throw;
            }
        }
    }
Esempio n. 3
0
        // Code to execute if a navigation fails
        private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
        {
            // REPORT THE ERROR:
            ErrorReporting.ReportException(e.Exception, "");

            if (Debugger.IsAttached)
            {
                // A navigation has failed; break into the debugger
                Debugger.Break();
            }
        }
Esempio n. 4
0
        // Code to execute on Unhandled Exceptions
        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            // REPORT THE ERROR:
            ErrorReporting.ReportException(e.ExceptionObject, "");

            if (Debugger.IsAttached)
            {
                // An unhandled exception has occurred; break into the debugger
                Debugger.Break();
            }
        }
    public void Render()
    {
        try
        {
            if (_renderDebugOverlay)
            {
                DebugOverlay.Render(GameViews.Primary);
            }

            if (_renderObjectTree)
            {
                new DebugObjectGraph().Render();
            }

            if (_renderRaycastStats)
            {
                RaycastStats.Render();
            }

            RenderMainMenuBar(out var height);

            // Disable mouse scrolling when the mouse is on the debug UI
            if (GameViews.Primary is GameView gameView)
            {
                gameView.IsMouseScrollingEnabled = height <= 0;
            }

            ObjectEditors.Render();

            ActionsDebugUi.Render();

            Tig.Console.Render(height);
        }
        catch (Exception e)
        {
            if (!ErrorReporting.ReportException(e))
            {
                throw;
            }
        }

        ErrorReportingUi.Render();

        ImGui.Render();
        var drawData = ImGui.GetDrawData();

        _renderer.ImGui_ImplDX11_RenderDrawLists(drawData);
    }
Esempio n. 6
0
 public void OnException(string message, Exception e)
 {
     ErrorReporting.ReportException(e, message);
     ErrorReporting.CheckForPreviousException(false);
 }
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     ErrorReporting.ReportException(e.ExceptionObject as Exception);
 }