From 90a5ba236badf526e44a7d114e4e7f1e298654b9 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 24 Aug 2019 22:34:23 +0200 Subject: [PATCH] Improve documentation of util::read_file/write_file --- src/util.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util.hpp b/src/util.hpp index 4753d2a14..c3d58417a 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -31,6 +31,8 @@ std::string base_name(const std::string& path); std::string dir_name(const std::string& path); // Read file data as a string. +// +// Throws Error on error. std::string read_file(const std::string& path); // Return true if prefix is a prefix of string. @@ -44,6 +46,8 @@ strip_whitespace(const std::string& string); [[gnu::warn_unused_result]] std::string to_lowercase(const std::string& string); // Write file data from a string. +// +// Throws Error on error. void write_file(const std::string& path, const std::string& data, bool binary = false); -- 2.47.3