Rework the client error handling

This commit is contained in:
Chunting Gu
2019-06-10 12:00:57 +08:00
parent c2a009f68a
commit 8c09189b14
16 changed files with 158 additions and 199 deletions
+1 -1
View File
@@ -204,7 +204,7 @@ FormPart::FormPart(const std::string& name, const Path& path,
const std::string& media_type)
: name_(name), media_type_(media_type) {
if (!ReadFile(path, &data_)) {
throw Exception(kFileIOError, "Cannot read the file.");
throw Error{ Error::kFileError, "Cannot read the file." };
}
// Determine file name from file path.