What is the recommended way to exit hard from a script in the event of an error? I triggered an error by introducing a nonsense line and can see the printout for it, but the process stays up even after the error:
Script error: Traceback (most recent call last):
File "/gateway_mitmproxy_script.py", line 93, in tcp_message
deliberate_syntax_error = foo
NameError: name 'foo' is not defined
The reason that I ask is that I’m running mitmproxy in a docker container that is being watched by another process, and I would like the docker container to exit when there is an error in the script.