Add Engine::ReportCrash event for custom crash reporting or handling

This commit is contained in:
Wojtek Figat
2025-01-24 20:15:17 +01:00
parent cf40facefe
commit b36e55446f
3 changed files with 10 additions and 1 deletions

View File

@@ -372,7 +372,10 @@ void PlatformBase::Fatal(const StringView& msg, void* context, FatalErrorType er
}
// Show error message
Error(msg);
if (Engine::ReportCrash.IsBinded())
Engine::ReportCrash(msg, context);
else
Error(msg);
// Only main thread can call exit directly
if (IsInMainThread())