1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-28 00:15:06 +00:00
OpenMW/components/crashcatcher/crashcatcher.hpp
elsid 007ad4e4d1
Write crash log to temporary directory
To make sure current user has rights to do so.
2023-01-30 09:30:55 +01:00

23 lines
581 B
C++

#ifndef CRASHCATCHER_H
#define CRASHCATCHER_H
#include <filesystem>
#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
constexpr char crash_switch[] = "--cc-handle-crash";
#if USE_CRASH_CATCHER
extern void crashCatcherInstall(int argc, char** argv, const std::filesystem::path& crashLogPath);
#else
inline void crashCatcherInstall(int, char**, const std::string& crashLogPath) {}
#endif
#endif