summaryrefslogtreecommitdiff
path: root/ffi.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2025-07-28 20:56:05 -0400
committerRusty Wagner <rusty.wagner@gmail.com>2025-08-01 14:35:04 -0400
commit8df034ed6b3a1a52bd268ed43e783c35b687408f (patch)
treecaa89977dfffe302514489b96b6cda1765f0af2b /ffi.h
parent1b2f5c4c8df34d399a8abaff7db5d2338cb90ac1 (diff)
Add LogForException APIs to pass stack trace information separate from the message
Diffstat (limited to 'ffi.h')
-rw-r--r--ffi.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffi.h b/ffi.h
index 15654c5f..e365f217 100644
--- a/ffi.h
+++ b/ffi.h
@@ -149,7 +149,7 @@ namespace BinaryNinja
//region Try/Catch Helpers
// Forward declare this, so we don't have to depend on binaryninjaapi.h
- void LogError(const char*, ...);
+ void LogErrorForException(const std::exception& e, const char*, ...);
/*!
Wrap a throwable block in a try/catch, passing through the return value on success, and
@@ -200,7 +200,7 @@ namespace BinaryNinja
{
// TODO: How to handle this?
// g_lastExceptionMessage = e.what();
- LogError("%s", e.what());
+ LogErrorForException(e, "%s", e.what());
return nullptr;
}
catch (...)
@@ -237,7 +237,7 @@ namespace BinaryNinja
{
// TODO: How to handle this?
// g_lastExceptionMessage = e.what();
- LogError("%s", e.what());
+ LogErrorForException(e, "%s", e.what());
return false;
}
catch (...)