blob: 27f522c4816056f99c9ed846ed9d5a73855e8f1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "global.h"
__attribute__((noreturn, format (printf, 1, 2)))
void throw(const char *format,...){
char *buf;
va_list ap;
va_start(ap,format);
vasprintf(&buf,format,ap);
va_end(ap);
fprintf(stderr,"THROW: %s\n",buf);
exit(1);
}
|