Skip to content

Commit 2755f90

Browse files
committed
More verbose RecursionError
1 parent 4edc8af commit 2755f90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Rules.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def findAndRecursivelyExecuteFunctions(requires_list: str, maxRecursion: int, re
8282
found_functions = re.findall(r'\{(\w+)\((.*?)\)\}', requires_list)
8383
if found_functions:
8484
if recursionDepth >= maxRecursion:
85-
raise RecursionError(f'the require in {area.get("name", f"An area with these parameters: {area}")} looped too many time ({maxRecursion})')
85+
raise RecursionError(f'One or more functions in "{area.get("name", f"An area with these parameters: {area}")}"\'s requires looped too many time (maximum recursion is {maxRecursion}) \
86+
\n As of this Exception the following function(s) are waiting to run: {[f[0] for f in found_functions]} \
87+
\n And the currently processed requires look like this: "{requires_list}"')
8688
else:
8789
for item in found_functions:
8890
func_name = item[0]

0 commit comments

Comments
 (0)