-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_error.c
22 lines (20 loc) · 1.12 KB
/
ft_error.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_error.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rabougue <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/02 15:14:04 by rabougue #+# #+# */
/* Updated: 2017/04/06 19:17:51 by rabougue ### ########.fr */
/* */
/* ************************************************************************** */
#include "./includes/libft.h"
void ft_critical_error(uint8_t error)
{
if (error == MALLOC_ERROR)
ft_dprintf(STDERR_FILENO, RED"Memory allocation failure !\n"END);
else
ft_dprintf(STDERR_FILENO, RED"Unknown error !\n"END);
exit(EXIT_FAILURE);
}