void test_error_exit( const char * fmt , ...) { char * s; va_list ap; va_start(ap , fmt); s = util_alloc_sprintf_va(fmt , ap); va_end(ap); fprintf(stderr , s ); exit(1); }
/** * Adding a message with a given message_level. A low message_level means "more important", as only messages with * message_level below the configured log_level will be included. */ void ert_log_add_fmt_message(int message_level , FILE * dup_stream , const char * fmt , ...) { if (log_include_message(logh,message_level)) { char * message; va_list ap; va_start(ap , fmt); message = util_alloc_sprintf_va( fmt , ap ); log_add_message( logh , message_level , dup_stream , message , true); va_end(ap); } }
void test_exit__(const char * file , int line , const char * fmt , ...) { fprintf(stderr , "Error at %s:%d:\n",file,line); { char * s; va_list ap; va_start(ap , fmt); s = util_alloc_sprintf_va(fmt , ap); va_end(ap); fprintf(stderr , s ); exit(1); } }