Formated all messages when an error occur