fixed GH #363: DateTimeParser tryParse/parse

This commit is contained in:
Alex Fabijanic
2014-05-22 03:08:41 -05:00
parent c99c776aff
commit 83d11b5a00
6 changed files with 42 additions and 6 deletions

View File

@@ -46,6 +46,9 @@ namespace Poco {
void DateTimeParser::parse(const std::string& fmt, const std::string& str, DateTime& dateTime, int& timeZoneDifferential)
{
if (fmt.empty() || str.empty())
throw SyntaxException("Empty string.");
int year = 0;
int month = 0;
int day = 0;