Error classes Each case below corresponds to a concrete failure mode already implied by the parser or map validator contract.
Missing required header
parse step 5`NO/SO/WE/EA/F/C` is incomplete, so the file never reaches a valid configuration state.
`check_required_headers()` rejects the file because required config slots are incomplete.Duplicate identifier
parse step 4The same header is declared twice, which breaks the one-value-per-field contract.
Header parsing stops as soon as the duplicate identifier is encountered.Invalid texture path
parse step 4Texture values must exist, point to readable files, and use the expected `.xpm` extension.
Texture parsing rejects non-`.xpm` paths or unreadable files before map validation begins.Invalid RGB value
parse step 4Color headers require exactly three numeric components within `0..255`.
Color parsing fails on malformed syntax or out-of-range values such as `300`.Missing map block
parse step 6All headers may be valid, but the file still needs a map body after configuration.
`parse_loaded_file()` rejects the file when `map_start` reaches EOF.Unknown identifier or malformed header
parse step 4A non-map line that is not a valid `NO/SO/WE/EA/F/C` header stops configuration parsing.
`parse_headers()` reports either an unknown identifier or invalid header format before map validation.No spawn or multiple spawns
validate step 1The map must contain exactly one player marker among `N/S/E/W`.
`validate_player()` rejects the map when spawn count is `0` or greater than `1`.Invalid map symbol
validate step 2A map character outside the accepted alphabet is rejected immediately.
`validate_chars()` rejects symbols outside `{0,1,N,S,E,W,space}` in mandatory mode.Open map / leak to void
validate step 3The playable area reaches padding, an out-of-bounds zone, or an irregular gap.
Enclosure validation detects that BFS can leak through the malformed boundary.Unreachable map area
validate step 3After BFS from the player, any unvisited open area is rejected as disconnected map content.
`scan_unreachable()` reports `Map contains unreachable areas` when open cells are not reachable from the spawn.