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