diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2025-08-01 17:02:14 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2025-08-01 20:56:33 -0400 |
| commit | 15c635b873105eda2861430d062ea3f6bdfe9d9b (patch) | |
| tree | f5b17f7aa1388660992e233b3711654aad0cfb0c /python/datarender.py | |
| parent | 24fef31b14b89198185e5edc39ab7e6a7ef2e9ba (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/datarender.py')
| -rw-r--r-- | python/datarender.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/datarender.py b/python/datarender.py index 6b1a2bd8..d516f26e 100644 --- a/python/datarender.py +++ b/python/datarender.py @@ -27,7 +27,7 @@ from . import filemetadata from . import binaryview from . import function from . import enums -from .log import log_error +from .log import log_error_for_exception from . import types from . import highlight from . import types @@ -113,7 +113,7 @@ class DataRenderer: try: self.perform_free_object(ctxt) except: - log_error(traceback.format_exc()) + log_error_for_exception("Unhandled Python exception in DataRenderer._free_object") def _is_valid_for_data(self, ctxt, view, addr, type, context, ctxCount): try: @@ -127,7 +127,7 @@ class DataRenderer: ) return self.perform_is_valid_for_data(ctxt, view, addr, type, pycontext) except: - log_error(traceback.format_exc()) + log_error_for_exception("Unhandled Python exception in DataRenderer._is_valid_for_data") return False def _get_lines_for_data(self, ctxt, view, addr, type, prefix, prefixCount, width, count, typeCtx, ctxCount, language): @@ -175,7 +175,7 @@ class DataRenderer: return ctypes.cast(self.line_buf, ctypes.c_void_p).value except: - log_error(traceback.format_exc()) + log_error_for_exception("Unhandled Python exception in DataRenderer._get_lines_for_data") return None def _free_lines(self, ctxt, lines, count): |
