Minor cleanup.

This commit is contained in:
Simon Forman 2022-09-08 14:25:02 -07:00
parent 359131f7b1
commit f08db94db1
1 changed files with 6 additions and 5 deletions

View File

@ -535,11 +535,12 @@ def interp(stack=(), dictionary=None):
stack, _, dictionary = run(text, stack, dictionary) stack, _, dictionary = run(text, stack, dictionary)
except UnknownSymbolError as sym: except UnknownSymbolError as sym:
print('Unknown:', sym) print('Unknown:', sym)
except StackUnderflowError as e: except (
print(e) # 'Not enough values on stack.' StackUnderflowError,
except NotAnIntError as e: NotABoolError,
print(e) NotAListError,
except NotAListError as e: NotAnIntError,
) as e:
print(e) print(e)
except SystemExit as e: except SystemExit as e:
raise SystemExit from e raise SystemExit from e