Route diagnostic hooks through platform services
This commit is contained in:
@@ -101,6 +101,26 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
void log_stacktrace() override
|
||||
{
|
||||
#if defined(__OSX__)
|
||||
NSString* callstack = [[NSThread callStackSymbols] componentsJoinedByString:@"\n"];
|
||||
LOG("callstack:\n%s", [callstack cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||
#endif
|
||||
}
|
||||
|
||||
void trigger_crash_test() override
|
||||
{
|
||||
#ifdef __IOS__
|
||||
[App::I->ios_view crash];
|
||||
#elif __OSX__
|
||||
[App::I->osx_view hockeyapp_crash];
|
||||
#elif defined(__ANDROID__)
|
||||
int *x = nullptr; *x = 42;
|
||||
LOG("%d", *x);
|
||||
#endif
|
||||
}
|
||||
|
||||
[[nodiscard]] std::string clipboard_text() override
|
||||
{
|
||||
#if __IOS__
|
||||
|
||||
Reference in New Issue
Block a user