Never trust users! Encapsulate "isolating program vulnerabilities (errors, exceptions, or results due to unexpected input) that may be caused by executed code" and "calling function that handle them" as a package of Python.
The documentation is hosted on Github repository: https://github.com/leoweyr/Python-Unexpectation_Handler/blob/main/doc