From e17ec1742e501c1ee2bdf4b10e14a0cc1faf2ace Mon Sep 17 00:00:00 2001 From: Martin Teichmann <martin.teichmann@gmail.com> Date: Tue, 7 Feb 2023 21:04:49 +0000 Subject: [PATCH] stop using RuntimeError --- ebpfcat/ebpf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ebpfcat/ebpf.py b/ebpfcat/ebpf.py index ebe5555..7144f58 100644 --- a/ebpfcat/ebpf.py +++ b/ebpfcat/ebpf.py @@ -335,7 +335,7 @@ class Comparison(ABC): return InvertComparison(self.ebpf, self) def __bool__(self): - raise RuntimeError("Use with statement for comparisons") + raise AssembleError("Use with statement for comparisons") class SimpleComparison(Comparison): @@ -455,7 +455,7 @@ class Expression: return Negate(self.ebpf, self) def __bool__(self): - raise RuntimeError("Expression only has a value at execution time") + raise AssembleError("Expression only has a value at execution time") def __enter__(self): ret = self != 0 -- GitLab