From 1ba297f719c02d129bda1a820b61c263dcb9f943 Mon Sep 17 00:00:00 2001 From: "DHR.Mike" Date: Thu, 1 Jan 2026 05:00:15 -0800 Subject: [PATCH] Add Uptated-Prototype/Code-Snippets/ErrorMsg.py --- Uptated-Prototype/Code-Snippets/ErrorMsg.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Uptated-Prototype/Code-Snippets/ErrorMsg.py diff --git a/Uptated-Prototype/Code-Snippets/ErrorMsg.py b/Uptated-Prototype/Code-Snippets/ErrorMsg.py new file mode 100644 index 0000000..4fcb4d0 --- /dev/null +++ b/Uptated-Prototype/Code-Snippets/ErrorMsg.py @@ -0,0 +1,13 @@ +def ErrorMsg(string = None, exception = None): + try: + print(f"An Exception has occured when attempting to - {string}\nException: {exception}\nClass: {type(exception)}") + return True + except: + return False + +#x = "Hello!" + +try: + print(x) +except Exception as MyException: + print(ErrorMsg("Print", MyException)) \ No newline at end of file