usql updates, lexer changes

This commit is contained in:
2021-09-15 21:22:24 +02:00
parent 7e4a4b5583
commit 1e0506e6cd
21 changed files with 986 additions and 777 deletions

View File

@@ -18,8 +18,8 @@ std::string date_to_string(const long datetime, const std::string format) {
std::string result = {mbstr};
return result;
}
// TODO exception here
return "invalid argument";
throw std::runtime_error("date_to_string invalid date string or format");
}
time_t time_to_epoch ( const struct tm *ltm, int utcdiff ) {
@@ -70,8 +70,7 @@ long string_to_date(const std::string &datestr, const std::string &format) {
return time_to_epoch(timeinfo, -1 * timeinfo->tm_gmtoff);
}
// throw Exception("invalid date string or format");
return -1;
throw std::runtime_error("string_to_date invalid date string or format");
}