Custom OnCrash() logic

I would like to add custom crash / exception logic to my unreal project. To be specific, I have event queue/log that I would like to dump to disk in case of crash / unexpected application exit. In plain C++ i would probably end up with exception catching around game logic, but in case of UE4 it is somewhat problematic. I know that there is some alternative way unreal deals with this kind of situation(calling CrashHandler, printing core dump, saving crash logs etc.) but, I was unable to find the right place in code to inject my custom piece of code. I hope someone knowledgeable(preferable from @Epic) could point me in the right direction here.

Check out WindowsPlatformCrashContext.cpp. Specifically, you’ll find:

So if you subscribe something to that delegate, it should theoretically run when the game crashes.

I briefly tested and it does seems to work. Thank you.