Pranav A.
Pranav A.

Reputation: 470

Is there a python3 equivalent to the bash command `set -e`?

Is there a python3 equivalent to to the bash command set -e? That is, to stop execution as soon as an error occurs? Or does python already do this?

Upvotes: 0

Views: 145

Answers (1)

Mike Müller
Mike Müller

Reputation: 85492

Python will always stop execution when an uncaught exception occurs. It will print the traceback with information about the exception.

Upvotes: 3

Related Questions