diff options
Diffstat (limited to 'src/error.c')
| -rw-r--r-- | src/error.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/error.c b/src/error.c new file mode 100644 index 0000000..92e3a71 --- /dev/null +++ b/src/error.c @@ -0,0 +1,13 @@ +#include "mandel.h" + +void error_check_sdl(const char *code, const char *filename, int line_num) +{ + const char *err; + + err = SDL_GetError(); + if (*err == '\0') + return ; + SDL_Log("[ERROR SDL] %s\n\t(%s) at %s:%d", err, code, filename, line_num); + SDL_Quit(); + exit(EXIT_FAILURE); +} |
