[Base] Android error reporting via SIGABRT/RuntimeException

This commit is contained in:
Triang3l
2022-01-30 18:36:11 +03:00
parent c5e3332640
commit d2ef8d3300
5 changed files with 71 additions and 7 deletions

View File

@@ -11,6 +11,7 @@
#include <algorithm>
#include <atomic>
#include <cstdlib>
#include <cstring>
#include <mutex>
#include <vector>
@@ -500,7 +501,13 @@ void FatalError(const std::string_view str) {
}
ShutdownLogging();
std::exit(1);
#if XE_PLATFORM_ANDROID
// Throw an error that can be reported to the developers via the store.
std::abort();
#else
std::exit(EXIT_FAILURE);
#endif // XE_PLATFORM_ANDROID
}
} // namespace xe