diff options
| -rw-r--r-- | err.c | 15 | ||||
| -rw-r--r-- | err.h | 8 |
2 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,15 @@ +#include "err.h" + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +#include "log.h" + +void die(const char* err, ...) { + va_list p; + va_start(p, err); + log_write(LOG_ERR, err, p); + va_end(p); + exit(128); +} @@ -0,0 +1,8 @@ +#ifndef SS_ERR_H +#define SS_ERR_H + +#include <stdarg.h> + +void die(const char* err, ...); + +#endif /* SS_ERR_H */ |
