ajout condition getwarning