summaryrefslogtreecommitdiff
path: root/python/debuginfo.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2025-08-01 17:02:14 -0400
committerRusty Wagner <rusty.wagner@gmail.com>2025-08-01 20:56:33 -0400
commit15c635b873105eda2861430d062ea3f6bdfe9d9b (patch)
treef5b17f7aa1388660992e233b3711654aad0cfb0c /python/debuginfo.py
parent24fef31b14b89198185e5edc39ab7e6a7ef2e9ba (diff)
Use log_error_for_exception in the Python API to pass tracebacks in the stack trace associated with log messages, instead of creating large mutli-line messages for every exception
Diffstat (limited to 'python/debuginfo.py')
-rw-r--r--python/debuginfo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/debuginfo.py b/python/debuginfo.py
index 1b8aac74..376e2b5e 100644
--- a/python/debuginfo.py
+++ b/python/debuginfo.py
@@ -28,7 +28,7 @@ import binaryninja
from . import _binaryninjacore as core
from . import platform as _platform
from . import types as _types
-from .log import log_error
+from .log import log_error_for_exception
from . import binaryview
from . import filemetadata
from . import typecontainer
@@ -102,7 +102,7 @@ class _DebugInfoParserMetaClass(type):
view_obj = binaryview.BinaryView(file_metadata=file_metadata, handle=core.BNNewViewReference(view))
return callback(view_obj)
except:
- log_error(traceback.format_exc())
+ log_error_for_exception("Unhandled Python exception in _DebugInfoParserMetaClass._is_valid")
return False
@staticmethod
@@ -119,7 +119,7 @@ class _DebugInfoParserMetaClass(type):
assert parser_ref is not None, "core.BNNewDebugInfoReference returned None"
return callback(DebugInfo(parser_ref), view_obj, debug_view_obj, progress)
except:
- log_error(traceback.format_exc())
+ log_error_for_exception("Unhandled Python exception in _DebugInfoParserMetaClass._parse_info")
return False
@classmethod