-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.c
31 lines (28 loc) · 1.2 KB
/
error.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* ************************************************************************** */
/* */
/* :::::::: */
/* error.c :+: :+: */
/* +:+ */
/* By: jandre-d <[email protected]> +#+ */
/* +#+ */
/* Created: 2019/03/25 14:17:37 by jandre-d #+# #+# */
/* Updated: 2019/03/30 21:41:26 by jandre-d ######## odam.nl */
/* */
/* ************************************************************************** */
#include "error.h"
#include "libft/libft.h"
#include <stdlib.h>
void error_malloc(char *where)
{
ft_putstr("\n\nERROR!!! Malloc failed at: ");
ft_putstr((const char *)where);
exit(1);
}
void error_general(char *msg, char *where)
{
ft_putstr("\n\nERROR : ");
ft_putstr(msg);
ft_putstr("\n at : ");
ft_putstr(where);
exit(1);
}