First commit
This commit is contained in:
16
common/DieWithMessage.c
Normal file
16
common/DieWithMessage.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void DieWithUserMessage(const char *msg, const char *detail) {
|
||||
fputs(msg, stderr);
|
||||
fputs(": ", stderr);
|
||||
fputs(detail, stderr);
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void DieWithSystemMessage(const char *msg) {
|
||||
perror(msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user