diff options
author | Olga Khlopkova <o.khlopkova@corp.mail.ru> | 2020-04-28 11:25:36 +0300 |
---|---|---|
committer | Olga Khlopkova <o.khlopkova@corp.mail.ru> | 2020-04-28 11:25:36 +0300 |
commit | 384884ed6f567fba5ee1cf8f5c80479c3e0bde56 (patch) | |
tree | 2d66d68fbbd17ba93a6bb6470994442d030a6b89 | |
parent | a5584e1c42b6f01a7d65aa0ca909d9f8af4f3cf8 (diff) |
more info in error messages
-rw-r--r-- | include/just_gtfs/just_gtfs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/just_gtfs/just_gtfs.h b/include/just_gtfs/just_gtfs.h index 85a5835..ed70c87 100644 --- a/include/just_gtfs/just_gtfs.h +++ b/include/just_gtfs/just_gtfs.h @@ -147,11 +147,11 @@ inline Result CsvParser::read_header(const std::string & csv_filename) csv_stream.open(gtfs_path / csv_filename); if (!csv_stream.is_open()) - return {ResultCode::ERROR_FILE_ABSENT, {}}; + return {ResultCode::ERROR_FILE_ABSENT, "File " + csv_filename + "could not be opened"}; std::string header; if (!getline(csv_stream, header) || header.empty()) - return {ResultCode::ERROR_INVALID_FIELD_FORMAT, {}}; + return {ResultCode::ERROR_INVALID_FIELD_FORMAT, "Empty header in file " + csv_filename}; field_sequence = split_record(header, true); return {ResultCode::OK, {}}; |