@@ -17,6 +17,18 @@ namespace Backtrace.Unity.Common
1717 [ StructLayout ( LayoutKind . Sequential , Pack = 4 ) ]
1818 internal struct MiniDumpExceptionInformation
1919 {
20+
21+ //====================================================================
22+ // Win32 Exception stuff
23+ // These are mostly interesting for Structured exception handling,
24+ // but need to be exposed for all exceptions (not just SEHException).
25+ //====================================================================
26+ //[System.Security.SecurityCritical] // auto-generated_required
27+ //[System.Runtime.Versioning.ResourceExposure(System.Runtime.Versioning.ResourceScope.None)]
28+ //[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
29+ //[System.Runtime.InteropServices.ComVisible(true)]
30+ //public static extern /* struct _EXCEPTION_POINTERS* */ IntPtr GetExceptionPointers();
31+
2032 /// <summary>
2133 /// current thread id
2234 /// </summary>
@@ -44,6 +56,27 @@ internal static MiniDumpExceptionInformation GetInstance(MinidumpException excep
4456 exp . ThreadId = SystemHelper . GetCurrentThreadId ( ) ;
4557 exp . ClientPointers = false ;
4658 exp . ExceptionPointers = IntPtr . Zero ;
59+ // right now Unity environment doesn't support
60+ // GetExceptionPointers
61+ // because of that we cannot pass exception pointer to minidump write method
62+
63+ //right now GetExceptionPointers method is not available in .NET Standard
64+ //#if !NET_STANDARD_2_0
65+ // try
66+ // {
67+ // if (exceptionInfo == MinidumpException.Present)
68+ // {
69+ // exp.ExceptionPointers = GetExceptionPointers();
70+ // }
71+ // }
72+ // catch (Exception e)
73+ // {
74+ //#if DEBUG
75+ // UnityEngine.Debug.Log(string.Format("Cannot add exception information to minidump file. Reason: {0}", e));
76+ //#endif
77+ // ///Operation not supported;
78+ // }
79+ //#endif
4780 return exp ;
4881 }
4982 }
0 commit comments