Better logging when error is raised during sending a message.