16 lines
345 B
C
16 lines
345 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#include <../inc/errExit.h>
|
||
|
|
||
|
void errExit(char *func, char *where) {
|
||
|
fprintf(stderr, "\033[91m<Error>\033[39m %s failed in %s\n", func, where);
|
||
|
perror("");
|
||
|
exit(1);
|
||
|
}
|
||
|
|
||
|
void errExitMsg(char *msg) {
|
||
|
fprintf(stderr, "\033[91m<Error>\033[39m\n");
|
||
|
perror(msg);
|
||
|
exit(1);
|
||
|
}
|