-
-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Labels
Description
Hi,
I have this Sentry (v0.12.1) setup:
#ifdef HAVE_SENTRY
auto* options = sentry_options_new();
sentry_options_set_debug(options, true);
sentry_options_set_dsn(options, dsn.data());
sentry_options_set_sample_rate(options, 1.0);
#ifdef _WIN32
static constexpr auto program = "crashpad_handler.exe";
#else
static constexpr auto program = "crashpad_handler";
#endif
const auto crashpad = std::filesystem::current_path() / program;
const auto handler_path = crashpad.string();
sentry_options_set_handler_path(options, handler_path.c_str());
sentry_options_set_database_path(options, ".sentry");
sentry_options_add_attachment(options, "cassette.tape");
sentry_options_add_attachment(options, "stdout.txt");
sentry_options_add_attachment(options, "stderr.txt");
sentry_options_add_attachment(options, "VERSION");
sentry_init(options);
#endifAnd I have this clean up
#include "application.hpp"
using namespace framework;
application::application(const int argc, char** const argv) {
#ifdef HAVE_SENTRY
std::atexit([] { sentry_flush(3000); }); // sentry_close();
#endif
#ifdef HAVE_STEAM
std::atexit([] { SteamAPI_Shutdown(); });
#endif
std::atexit([] { PHYSFS_deinit(); });
std::atexit([] { SDL_Quit(); });
SDL_Init(SDL_INIT_GAMEPAD | SDL_INIT_VIDEO);
PHYSFS_init(argv[0]);
#ifdef HAVE_STEAM
SteamAPI_InitSafe();
#endif
}
int application::run() {
static_assert(std::endian::native == std::endian::little);
try {
const char* const p = std::getenv("CARTRIDGE");
storage::filesystem::mount(p ? p : "cartridge.rom", "/");
auto se = scriptengine();
se.run();
} catch (const std::exception& e) {
const auto error = e.what();
std::println(stderr, "{}", error);
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Ink Spill Disaster", error, nullptr);
#ifdef HAVE_SENTRY
const auto event = sentry_value_new_event();
const auto exc = sentry_value_new_exception("Exception", error);
sentry_value_set_stacktrace(exc, nullptr, 0);
sentry_event_add_exception(event, exc);
sentry_capture_event(event);
sentry_flush(3000);
#endif
return 1;
}
return 0;
}
Why when I close the game/app I always got an error on sentry?

Metadata
Metadata
Assignees
Labels
Projects
Status
No status