-
Notifications
You must be signed in to change notification settings - Fork 3
Parsing Errors
-
1 :
E_FILENAME
Since we read files line by line, we need to avoid files like
/dev/random
or/dev/null
that have a null or low probability of newline byte (0x0A) in them. So every data-file handled by our program must have a ".data" extension.
-
14 :
E_P_FS_LINE
This error is triggered when the header information of the map isn't correctly formatted.
-
15 :
E_P_VERTEX
This error is triggered when one misformatted vertex declaration is encountered.
-
16 :
E_P_PLAYER
This error is triggered when the player location is misformatted.
-
17 :
E_P_SECTOR
This error is triggered when one misformatted sector declaration is encountered.
-
18 :
E_P_BLANK
This error is triggered when one non-informative line (either a blank one or a comment) contains junk bytes.
-
20 :
E_P_OPEN
This error is triggered when
open()
failed to retrieve the filedescriptor of the given file.
-
21 :
E_P_GNL
ft_get_next_line()
is our own function to read on filedescriptors line by line, this process can fail at different levels and need to be handled to avoid segmentation faults afterwards. If this error occurs it means that the requested line couldn't be retrieved from the given filedescriptor.
-
22 :
E_P_CLOSE
This error is triggered when
close()
failed close the given file.
-
23 :
E_P_NO_PLAYER
This error is triggered when the player location is incorrect.
-
24 :
E_P_TOTAL
This error is triggered when the amount of vertices is invalid (e.g negative or null).
-
25 :
E_P_NB_VERTEX
This error is triggered when either the amount of vertices isn't enough to build a polygon or doesn't match the map header information.
-
26 :
E_P_NB_SECTOR
This error is triggered when the amount of sectors doesn't match the map header information.
-
27 :
E_P_NO_TOTAL
This error is triggered when the "total" line is missing from the parsed map, critical informations within it makes the building process impossible.