Log the exception message.