From 53bedffbef9348a259faf4f410e8b54164618ba2 Mon Sep 17 00:00:00 2001 From: Nick Drozd Date: Sun, 26 May 2024 00:12:19 -0400 Subject: [PATCH] Rename caught exception --- tm/rules.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tm/rules.py b/tm/rules.py index efb8529b..29daa0c3 100644 --- a/tm/rules.py +++ b/tm/rules.py @@ -253,10 +253,10 @@ def count_apps(rule: Rule, tape: IndexTape) -> Apps | None: try: div, rem = divmod(count, absdiff) - except ExpModLimit as exc: - raise RuleLimit(f'count_apps: {exc}') from exc - except ModDepthLimit as exc: - raise RuleLimit(f'depth-limit: {exc}') from exc + except ExpModLimit as exp: + raise RuleLimit(f'count_apps: {exp}') from exp + except ModDepthLimit as dep: + raise RuleLimit(f'depth-limit: {dep}') from dep times, min_res = ( (div, rem)