1
0
Эх сурвалжийг харах

Syntax error introduced by "Mechanism to dump a stack to trace file"

Source commit: 2790ec5498bea7199594ab68c45b4457e5c93ab4
Martin Prikryl 9 жил өмнө
parent
commit
3664144dbf

+ 17 - 2
source/windows/WinInterface.cpp

@@ -661,6 +661,23 @@ unsigned int __fastcall FatalExceptionMessageDialog(Exception * E, TQueryType Ty
   return ExceptionMessageDialog(E, Type, MessageFormat, Answers, HelpKeyword, &AParams);
 }
 //---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+static void __fastcall DoExceptNotify(TObject * ExceptObj, void * ExceptAddr,
+  bool OSException, void * BaseOfStack)
+{
+  if (ExceptObj != NULL)
+  {
+    Exception * E = dynamic_cast<Exception *>(ExceptObj);
+    if ((E != NULL) && IsInternalException(E)) // optimization
+    {
+      DoExceptionStackTrace(ExceptObj, ExceptAddr, OSException, BaseOfStack);
+
+      TJclStackInfoList * StackInfoList = JclLastExceptStackList();
+
+      if (DebugAlwaysTrue(StackInfoList != NULL))
+      {
+        std::unique_ptr<TStrings> StackTrace(StackInfoListToStrings(StackInfoList));
+
         DWORD ThreadID = GetCurrentThreadId();
 
         TGuard Guard(StackTraceCriticalSection.get());
@@ -684,8 +701,6 @@ unsigned int __fastcall FatalExceptionMessageDialog(Exception * E, TQueryType Ty
   }
 }
 //---------------------------------------------------------------------------
-#endif // ifdef _DEBUG
-//!CLEANEND
 void * __fastcall BusyStart()
 {
   void * Token = reinterpret_cast<void *>(Screen->Cursor);