Created
November 15, 2022 21:22
-
-
Save YiLi225/cf79e123a1ccca2d331fbdcfec1a0e23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
try: | |
1/0 | |
except Exception as myError: | |
myError.add_note(f'Hey, there is an error; \ | |
Raised at {datetime.now()}') | |
raise | |
Output: | |
Traceback (most recent call last): | |
File "<stdin>", line 5, in <module> | |
ZeroDivisionError: division by zero | |
Hey, there is an error; Raised at 2022-11-15 21:20:06.218401 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment