mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
impr: Only add stacktrace to exceptions thrown in main thread
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <hex/api/plugin_manager.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/trace/exceptions.hpp>
|
||||
|
||||
namespace hex::init {
|
||||
|
||||
@@ -41,17 +42,21 @@ int main(int argc, char **argv) {
|
||||
// Setup crash handlers right away to catch crashes as early as possible
|
||||
crash::setupCrashHandlers();
|
||||
|
||||
// Enable exception tracing on the main thread
|
||||
trace::enableExceptionCaptureForCurrentThread();
|
||||
|
||||
// Run platform-specific initialization code
|
||||
Window::initNative();
|
||||
|
||||
// Setup messaging system to allow sending commands to the main ImHex instance
|
||||
hex::messaging::setupMessaging();
|
||||
messaging::setupMessaging();
|
||||
|
||||
// Handle command line arguments if any have been passed
|
||||
if (argc > 1) {
|
||||
init::runCommandLine(argc, argv);
|
||||
}
|
||||
|
||||
|
||||
// Log some system information to aid debugging when users share their logs
|
||||
log::info("Welcome to ImHex {}!", ImHexApi::System::getImHexVersion().get());
|
||||
log::info("Compiled using commit {}@{}", ImHexApi::System::getCommitBranch(), ImHexApi::System::getCommitHash());
|
||||
|
||||
Reference in New Issue
Block a user