From a836eca6509a0a9a8b7bd12c5a6752f1581e895c Mon Sep 17 00:00:00 2001 From: Silas Kraume Date: Tue, 3 Oct 2023 00:03:40 +0200 Subject: [PATCH] fix evaluation error --- cat_win/util/converter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cat_win/util/converter.py b/cat_win/util/converter.py index 5eec7556..d592646a 100644 --- a/cat_win/util/converter.py +++ b/cat_win/util/converter.py @@ -115,9 +115,9 @@ def evaluate(self, _l: str, integrated: bool) -> str: except SyntaxError: new_l_tokens.append(f"{self.colors[0]}" + \ f"{('?' * len(res.group()) if integrated else '?')}{self.colors[2]}") - except (NameError, ValueError) as exc_inner: + except (NameError, ValueError, ArithmeticError) as exc_inner: self._evaluate_exception_handler(exc_inner, res.group(), new_l_tokens) - except (NameError, ValueError) as exc: + except (NameError, ValueError, ArithmeticError) as exc: self._evaluate_exception_handler(exc, res.group(), new_l_tokens) _l = _l[res.end():] res = re.search(self._eval_regex, _l)