Last active
March 9, 2024 03:38
-
-
Save m0hadang/77edb4ee4dc40f654205ce37f91a8184 to your computer and use it in GitHub Desktop.
get json(sentry native)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "sentry.h" | |
void TestFunction() { | |
sentry_value_t event = sentry_value_new_event(); | |
sentry_value_t exc = sentry_value_new_exception("Exception", "Error message."); | |
sentry_value_set_stacktrace(exc, NULL, 0); | |
sentry_event_add_exception(event, exc); | |
auto json = sentry_value_to_json(event); | |
std::cout << json << std::endl; | |
} | |
void main() { | |
TestFunction(); | |
Sleep(3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment