mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 19:45:23 -04:00
also include native hresult for unhandleded crashes with native code exceptions
This commit is contained in:
parent
8f5df6ad0e
commit
76f8726951
@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using OpenTK;
|
||||
|
||||
@ -27,7 +28,11 @@ namespace ClassicalSharp {
|
||||
|
||||
static string Format(Exception ex) {
|
||||
try {
|
||||
return ex.GetType().FullName + ": " + ex.Message + Environment.NewLine + ex.StackTrace;
|
||||
string msg = ex.GetType().FullName + ": " + ex.Message + Environment.NewLine + ex.StackTrace;
|
||||
ExternalException nativeEx = ex as ExternalException;
|
||||
|
||||
if (nativeEx == null) return msg;
|
||||
return msg + Environment.NewLine + "HRESULT: " + nativeEx.ErrorCode;
|
||||
} catch (Exception) {
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user