1 file changed, +10, -0
c3618efAdd doctrings to init method of ParseError
src/errors.py
+10, -0
+10, -0
@@ -1,3 +1,6 @@
1+"""Exceptions raised on purpose by the fly-in simulator."""
2+
3+
1 4 class FlyInError(Exception):
2 5 """Base for every error this program raises on purpose."""
3 6
@@ -6,6 +9,13 @@ class ParserError(FlyInError):
6 9 """A map file line that violates the format."""
710
811 def __init__(self, line_no: int, line: str, reason: str) -> None:
12+ """Record where the map file went wrong.
13+
14+ Args:
15+ line_no: 1-based number of the offending line.
16+ line: Raw text of that line, as read from the file.
17+ reason: Human-readable explanation of the violation.
18+ """
919 self.line_no = line_no
1020 self.line = line
1121 self.reason = reason