From 2f1cdea2ea56c2bbb76f34cfaf2f04ccce647352 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Wed, 29 Oct 2025 23:15:23 +1100 Subject: [PATCH] Add all exceptions & errors --- server.py | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index fac8eb9..786801d 100644 --- a/server.py +++ b/server.py @@ -59,7 +59,37 @@ def execute_code(code, request_obj, environment): 'pow': pow, 'range': range, 'repr': repr, 'reversed': reversed, 'round': round, 'set': set, 'slice': slice, 'sorted': sorted, 'str': str, 'sum': sum, 'super': super, 'tuple': tuple, 'type': type, - 'zip': zip,'Exception': Exception, + 'zip': zip, + 'BaseException': BaseException, + 'Exception': Exception, + 'ArithmeticError': ArithmeticError, + 'AssertionError': AssertionError, + 'AttributeError': AttributeError, + 'EOFError': EOFError, + 'FloatingPointError': FloatingPointError, + 'GeneratorExit': GeneratorExit, + 'ImportError': ImportError, + 'IndexError': IndexError, + 'KeyError': KeyError, + 'KeyboardInterrupt': KeyboardInterrupt, + 'LookupError': LookupError, + 'MemoryError': MemoryError, + 'NameError': NameError, + 'NotImplementedError': NotImplementedError, + 'OSError': OSError, + 'OverflowError': OverflowError, + 'RecursionError': RecursionError, + 'ReferenceError': ReferenceError, + 'RuntimeError': RuntimeError, + 'StopIteration': StopIteration, + 'StopAsyncIteration': StopAsyncIteration, + 'SyntaxError': SyntaxError, + 'SystemError': SystemError, + 'TypeError': TypeError, + 'UnboundLocalError': UnboundLocalError, + 'UnicodeError': UnicodeError, + 'ValueError': ValueError, + 'ZeroDivisionError': ZeroDivisionError }, 'request': request_obj, 'environment': environment,