fix exception message

This commit is contained in:
Alex Fabijanic 2017-09-04 10:38:04 -05:00
parent 9ea7000533
commit b4c62584c7

View File

@ -71,19 +71,19 @@ DateTime::DateTime(int otherYear, int otherMonth, int otherDay, int otherHour, i
}
else
{
throw Poco::InvalidArgumentException(Poco::format("Your Date time is %d-%d-%dT%d:%d:%d:%d:%d\n"
"Date time must be values of below.\n"
"Year must be betweent 0 and 9999\n"
"Month must be betweent 1 and 12\n"
"Day must be betweent 1 and %d\n"
"Hour must be betweent 0 and 23\n"
"Minute must be betweent 0 and 59\n"
"Second must be betweent 0 and 59\n"
"Millisecond must be betweent 0 and 999\n"
"Microseconds must be betweent 0 and 999",
_year, _month, _day, _hour, _minute,
_second, _millisecond, _microsecond,
daysOfMonth(_year, _month)));
throw Poco::InvalidArgumentException(Poco::format("Date time is %d-%d-%dT%d:%d:%d:%d:%d\n"
"Valid values:\n"
"0 <= year <= 9999\n"
"1 <= year <= 12\n"
"1 <= day <= %d\n"
"0 <= hour <= 23\n"
"0 <= minute <= 59\n"
"0 <= second <= 59\n"
"0 <= millisecond <= 999\n"
"0 <= microsecond <= 999",
_year, _month, _day, _hour, _minute,
_second, _millisecond, _microsecond,
daysOfMonth(_year, _month)));
}
}
@ -172,19 +172,19 @@ DateTime& DateTime::assign(int otherYear, int otherMonth, int otherDay, int othe
}
else
{
throw Poco::InvalidArgumentException(Poco::format("Your Date time is %d-%d-%dT%d:%d:%d:%d:%d\n"
"Date time must be values of below.\n"
"Year must be betweent 0 and 9999\n"
"Month must be betweent 1 and 12\n"
"Day must be betweent 1 and %d\n"
"Hour must be betweent 0 and 23\n"
"Minute must be betweent 0 and 59\n"
"Second must be betweent 0 and 59\n"
"Millisecond must be betweent 0 and 999\n"
"Microseconds must be betweent 0 and 999",
otherYear, otherMonth, otherDay, otherHour, otherMinute,
otherSecond, otherMillisecond, otherMicrosecond,
daysOfMonth(otherYear, otherMonth)));
throw Poco::InvalidArgumentException(Poco::format("Date time is %d-%d-%dT%d:%d:%d:%d:%d\n"
"Valid values:\n"
"0 <= year <= 9999\n"
"1 <= year <= 12\n"
"1 <= day <= %d\n"
"0 <= hour <= 23\n"
"0 <= minute <= 59\n"
"0 <= second <= 59\n"
"0 <= millisecond <= 999\n"
"0 <= microsecond <= 999",
_year, _month, _day, _hour, _minute,
_second, _millisecond, _microsecond,
daysOfMonth(_year, _month)));
}
return *this;