aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/io/TextFile.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/io/TextFile.hxx')
-rw-r--r--src/fs/io/TextFile.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fs/io/TextFile.hxx b/src/fs/io/TextFile.hxx
index 8bab808c7..5577363e7 100644
--- a/src/fs/io/TextFile.hxx
+++ b/src/fs/io/TextFile.hxx
@@ -56,10 +56,18 @@ public:
* space. There is a reasonable maximum line length, only to
* prevent denial of service.
*
+ * Use Check() after nullptr has been returned to check
+ * whether an error occurred or end-of-file has been reached.
+ *
* @param file the source file, opened in text mode
* @return a pointer to the line, or nullptr on end-of-file or error
*/
char *ReadLine();
+
+ /**
+ * Check whether a ReadLine() call has thrown an error.
+ */
+ bool Check(Error &error) const;
};
#endif