Added an error code for when an exception is raised.