Esempio n. 1
0
        static void LogException(Exception ex)
        {
            StaticExports.LogText(ex.ToString());

            if (ex.InnerException != null)
            {
                StaticExports.LogText("InnerException:");
                LogException(ex.InnerException);
            }
        }
Esempio n. 2
0
        static void HandleException(Exception ex)
        {
            // we log out this string, which is matched against in renderdoccmd to pull out the callstack
            // from the log even in the case where the user chooses not to submit the error log
            StaticExports.LogText("--- Begin C# Exception Data ---");
            if (ex != null)
            {
                LogException(ex);

                StaticExports.TriggerExceptionHandler(System.Runtime.InteropServices.Marshal.GetExceptionPointers(), true);
            }
            else
            {
                StaticExports.LogText("Exception is NULL");

                StaticExports.TriggerExceptionHandler(IntPtr.Zero, true);
            }

            System.Diagnostics.Process.GetCurrentProcess().Kill();
        }