Refactor error logging code to not re-raise exception

The traceback printed by `log.exception` was wrong in this case, so let's not log that. Instead, log the exception name along with the message.