globalCrashHandler feature request


#1

Could you make the following changes to SystemStats globalCrashHandler, so the platform specific crash details are passed out as a void*

diff --git a/modules/juce_core/system/juce_SystemStats.cpp b/modules/juce_core/system/juce_SystemStats.cpp
index cd43dcb0e..86f1c4328 100644
--- a/modules/juce_core/system/juce_SystemStats.cpp
+++ b/modules/juce_core/system/juce_SystemStats.cpp
@@ -158,15 +158,15 @@ String SystemStats::getStackBacktrace()
 static SystemStats::CrashHandlerFunction globalCrashHandler = nullptr;
 
 #if JUCE_WINDOWS
-static LONG WINAPI handleCrash (LPEXCEPTION_POINTERS)
+static LONG WINAPI handleCrash (LPEXCEPTION_POINTERS exceptionPointers)
 {
-    globalCrashHandler();
+    globalCrashHandler (exceptionPointers);
     return EXCEPTION_EXECUTE_HANDLER;
 }
 #else
-static void handleCrash (int)
+static void handleCrash (int sigNum)
 {
-    globalCrashHandler();
+    globalCrashHandler( (void*)sigNum);
     kill (getpid(), SIGKILL);
 }
 
diff --git a/modules/juce_core/system/juce_SystemStats.h b/modules/juce_core/system/juce_SystemStats.h
index b4b99c63d..9015c6d07 100644
--- a/modules/juce_core/system/juce_SystemStats.h
+++ b/modules/juce_core/system/juce_SystemStats.h
@@ -190,7 +190,7 @@ public:
     static String getStackBacktrace();
 
     /** A void() function type, used by setApplicationCrashHandler(). */
-    typedef void (*CrashHandlerFunction)();
+    typedef void (*CrashHandlerFunction) (void*);
 
     /** Sets up a global callback function that will be called if the application
         executes some kind of illegal instruction.

#2

Sure, will sort that out…