-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.c
More file actions
50 lines (44 loc) · 1.53 KB
/
error.c
File metadata and controls
50 lines (44 loc) · 1.53 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* ************************************************************************** */
/* */
/* :::::::: */
/* error.c :+: :+: */
/* +:+ */
/* By: lvan-vlo <lvan-vlo@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2019/08/10 13:10:59 by lvan-vlo #+# #+# */
/* Updated: 2019/09/28 16:28:27 by rcorke ######## odam.nl */
/* */
/* ************************************************************************** */
#include "lem_in.h"
void multiple_start_end_error(t_table *lem)
{
free_everything(lem);
write(2, "Error - multiple start/end rooms\n", 33);
exit(0);
}
void no_connection_error(t_table *lem)
{
free_everything(lem);
write(2, "Error - no links from start -> end\n", 35);
exit(0);
}
void no_start_end_error(t_table *lem)
{
free_everything(lem);
write(2, "Error - incorrect/no start/end\n", 31);
exit(0);
}
void room_not_found_error(t_table *lem)
{
free_everything(lem);
write(2, "Error - room not found\n", 23);
exit(0);
}
void wrong_input_error(t_table *lem, char *line)
{
free_everything(lem);
if (line)
free(line);
write(2, "Error\n", 6);
exit(0);
}