From 8a8ebbe2358f5ddfa8a5f59adcbd0e19d9e9b9f8 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Tue, 7 Nov 2023 10:44:39 -0500 Subject: Make non "if_available" il accessors throw ILException, create exceptions.py for custom exception types --- python/binaryview.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'python/binaryview.py') diff --git a/python/binaryview.py b/python/binaryview.py index ea0aba4f..009e668d 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -45,6 +45,8 @@ from .enums import ( TypeClass, BinaryViewEventType, FunctionGraphType, TagReferenceType, TagTypeType, RegisterValueType, LogLevel, DisassemblyOption ) +from .exceptions import RelocationWriteException + from . import associateddatastore # required for _BinaryViewAssociatedDataStore from .log import log_warn, log_error, Logger from . import typelibrary @@ -82,11 +84,6 @@ LineMatchCallbackType = Callable[[int, 'lineardisassembly.LinearDisassemblyLine' StringOrType = Union[str, '_types.Type', '_types.TypeBuilder'] -class RelocationWriteException(Exception): - """ Exception raised when a relocation fails to apply """ - pass - - @dataclass(frozen=True) class ReferenceSource: function: Optional['_function.Function'] -- cgit v1.3.1