2018-07-05 20:55:19 +00:00
|
|
|
#ifndef CRASHCATCHER_H
|
|
|
|
#define CRASHCATCHER_H
|
|
|
|
|
2023-01-30 08:20:16 +00:00
|
|
|
#include <filesystem>
|
2018-07-05 20:55:19 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#if (defined(__APPLE__) || (defined(__linux) && !defined(ANDROID)) || (defined(__unix) && !defined(ANDROID)) \
|
|
|
|
|| defined(__posix))
|
|
|
|
#define USE_CRASH_CATCHER 1
|
|
|
|
#else
|
|
|
|
#define USE_CRASH_CATCHER 0
|
|
|
|
#endif
|
|
|
|
|
2021-04-17 07:12:03 +00:00
|
|
|
constexpr char crash_switch[] = "--cc-handle-crash";
|
|
|
|
|
2018-07-05 20:55:19 +00:00
|
|
|
#if USE_CRASH_CATCHER
|
2022-06-19 11:28:33 +00:00
|
|
|
extern void crashCatcherInstall(int argc, char** argv, const std::filesystem::path& crashLogPath);
|
2018-07-05 20:55:19 +00:00
|
|
|
#else
|
2018-07-09 17:51:38 +00:00
|
|
|
inline void crashCatcherInstall(int, char**, const std::string& crashLogPath) {}
|
2018-07-05 20:55:19 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|