From: Martin Quinson Date: Mon, 26 Jun 2017 15:30:38 +0000 (+0200) Subject: no need for a backtrace if the file does not exist X-Git-Tag: v3_17~511^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/da0df350d739f04dfeb3f99af740a154069f20c8 no need for a backtrace if the file does not exist --- diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 186b559b94..72e5825570 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -1115,7 +1115,8 @@ void surf_parse_open(const char *file) xbt_free(dir); surf_file_to_parse = surf_fopen(file, "r"); - xbt_assert(surf_file_to_parse != nullptr, "Unable to open '%s'\n", file); + if (surf_file_to_parse == nullptr) + xbt_die("Unable to open '%s'\n", file); surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE); surf_parse__switch_to_buffer(surf_input_buffer); surf_parse_lineno = 1;