Source code for AutomateTheBoringStuff.Ch10.P2_errorExample
"""Error Example
This program raises an exception and automatically displays the traceback.
"""
[docs]def bacon() -> None:
"""Bacon
Raises base exception.
Returns:
None.
Raises:
Exception: Always
"""
raise Exception("This is the error message.")
if __name__ == '__main__':
main()