Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/just_gtfs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlga Khlopkova <o.khlopkova@corp.mail.ru>2020-04-28 11:25:36 +0300
committerOlga Khlopkova <o.khlopkova@corp.mail.ru>2020-04-28 11:25:36 +0300
commit384884ed6f567fba5ee1cf8f5c80479c3e0bde56 (patch)
tree2d66d68fbbd17ba93a6bb6470994442d030a6b89
parenta5584e1c42b6f01a7d65aa0ca909d9f8af4f3cf8 (diff)
more info in error messages
-rw-r--r--include/just_gtfs/just_gtfs.h4
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, {}};