Updated the way exceptions are compared