aboutsummaryrefslogtreecommitdiff
path: root/src/error.c
blob: 92e3a71507772db921c48822432d99b458492c06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
}