Added a warning log when an exception has occurred.