added sending messages when exception thrown