Sentry: implement basic exception reporting, error breadcrumbs

This commit is contained in:
Lion Kortlepel
2021-08-08 01:32:25 +02:00
committed by Lion
parent 550c658ac5
commit 2b4fec6d11
5 changed files with 66 additions and 32 deletions

View File

@@ -1,14 +1,25 @@
#ifndef SENTRY_H
#define SENTRY_H
#include <sentry.h>
#include <string>
enum class Logger {
};
// singleton, dont make this twice
class Sentry final {
class TSentry final {
public:
Sentry(const std::string& SentryUrl);
~Sentry();
TSentry(const std::string& SentryUrl);
~TSentry();
void Log(sentry_level_t level, const std::string& logger, const std::string& text);
void LogException(const std::exception& e, const std::string& file, const std::string& line);
void AddErrorBreadcrumb(const std::string& msg, const std::string& file, const std::string& line);
private:
bool mValid { true };
};
#endif // SENTRY_H