summaryrefslogtreecommitdiff
path: root/python/highlevelil.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/highlevelil.py')
-rw-r--r--python/highlevelil.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py
index b757727d..647f8503 100644
--- a/python/highlevelil.py
+++ b/python/highlevelil.py
@@ -626,7 +626,8 @@ class HighLevelILInstruction(BaseILInstruction):
ExpressionIndex(self.core_instr.operands[operand_index]))
def get_intrinsic(self, operand_index:int) -> 'lowlevelil.ILIntrinsic':
- assert self.function.arch is not None, "Attempting to create ILIntrinsic from function with no Architecture"
+ if self.function.arch is None:
+ raise ValueError("Attempting to create ILIntrinsic from function with no Architecture")
return lowlevelil.ILIntrinsic(self.function.arch,
architecture.IntrinsicIndex(self.core_instr.operands[operand_index]))
@@ -2197,7 +2198,7 @@ class HighLevelILFunction:
def ssa_form(self) -> 'HighLevelILFunction':
"""High level IL in SSA form (read-only)"""
result = core.BNGetHighLevelILSSAForm(self.handle)
- assert result is not None
+ assert result is not None, "core.BNGetHighLevelILSSAForm returned None"
return HighLevelILFunction(self._arch, result, self._source_function)
@property