sexp-parser: improve error message
This commit is contained in:
@ -35,7 +35,7 @@ parsing_error(size_t pos, const char* frm, ...)
|
||||
if (pos == 0)
|
||||
return Mu::Error(Error::Code::Parsing, "%s", msg.c_str());
|
||||
else
|
||||
return Mu::Error(Error::Code::Parsing, "%zu: %s", msg.c_str());
|
||||
return Mu::Error(Error::Code::Parsing, "%zu: %s", pos, msg.c_str());
|
||||
}
|
||||
static size_t
|
||||
skip_whitespace (const std::string& s, size_t pos)
|
||||
|
||||
@ -106,13 +106,15 @@ std::string quoted (const std::string& str);
|
||||
|
||||
|
||||
/**
|
||||
* Convert an ISO date to the corresponding time expressed as a string
|
||||
* with a 10-digit time_t
|
||||
* Convert an date to the corresponding time expressed as a string with a
|
||||
* 10-digit time_t
|
||||
*
|
||||
* @param date
|
||||
* @param first
|
||||
* @param date the date expressed a YYYYMMDDHHMMSS or any n... of the first
|
||||
* characters.
|
||||
* @param first whether to fill out incomplete dates to the start or the end;
|
||||
* ie. either 1972 -> 197201010000 or 1972 -> 197212312359
|
||||
*
|
||||
* @return
|
||||
* @return the corresponding time_t expressed as a strng
|
||||
*/
|
||||
std::string date_to_time_t_string (const std::string& date, bool first);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user