usql updates, lexer changes
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user