Throw exception in Utility::ToDouble/Utility::ToLong

Fixes #3617
This commit is contained in:
Gunnar Beutner 2013-02-02 20:19:00 +01:00
parent 0d3ce60e4f
commit 5438c86e76
1 changed files with 2 additions and 2 deletions

View File

@ -23,12 +23,12 @@ using namespace icinga;
long Convert::ToLong(const String& val)
{
return strtol(val.CStr(), NULL, 10);
return boost::lexical_cast<long>(val);
}
double Convert::ToDouble(const String& val)
{
return strtod(val.CStr(), NULL);
return boost::lexical_cast<double>(val);
}
bool Convert::ToBool(const String& val)