Created exception error message

Prints an error message after exiting when an exception is caught.