From 8df034ed6b3a1a52bd268ed43e783c35b687408f Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Mon, 28 Jul 2025 20:56:05 -0400 Subject: Add LogForException APIs to pass stack trace information separate from the message --- ui/logview.h | 2 ++ ui/progresstask.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/logview.h b/ui/logview.h index 36f0f080..b1ce57a1 100644 --- a/ui/logview.h +++ b/ui/logview.h @@ -130,6 +130,8 @@ class BINARYNINJAUIAPI LogListModel : public QAbstractItemModel, BinaryNinja::Lo void clear(); virtual void LogMessage(size_t sessionId, BNLogLevel level, const std::string& msg, const std::string& loggerName = "", size_t tid = 0) override; + virtual void LogMessageWithStackTrace(size_t sessionId, BNLogLevel level, const std::string& stackTrace, + const std::string& msg, const std::string& loggerName = "", size_t tid = 0) override; virtual BNLogLevel GetLogLevel() override; QString getFormattedMessage(const LogListItem& item) const; diff --git a/ui/progresstask.h b/ui/progresstask.h index 6765ec2d..58bfb7d3 100644 --- a/ui/progresstask.h +++ b/ui/progresstask.h @@ -352,7 +352,8 @@ class BINARYNINJAUIAPI BackgroundThread : public QObject // Just print an error and keep going catch (std::exception& e) { - BinaryNinja::LogError("Exception thrown in BackgroundThread::finally(): %s", e.what()); + BinaryNinja::LogErrorForException( + e, "Exception thrown in BackgroundThread::finally(): %s", e.what()); } catch (...) { @@ -413,7 +414,8 @@ class BINARYNINJAUIAPI BackgroundThread : public QObject // Just print an error and keep going catch (std::exception& e) { - BinaryNinja::LogError("Exception thrown in BackgroundThread::finally(): %s", e.what()); + BinaryNinja::LogErrorForException( + e, "Exception thrown in BackgroundThread::finally(): %s", e.what()); } catch (...) { -- cgit v1.3.1