Skip to content
Snippets Groups Projects
Commit 0b1c00a9 authored by Franck Dary's avatar Franck Dary
Browse files

Throw error if column not found in NumericColumnModule

parent 81fdf354
No related branches found
No related tags found
No related merge requests found
......@@ -78,8 +78,11 @@ void NumericColumnModuleImpl::addToContext(std::vector<std::vector<long>> & cont
{
double res = 0.0;
if (index >= 0)
try {res = std::stof(config.getAsFeature(column, index).get());}
{
auto value = config.getAsFeature(column, index).get();
try {res = std::stof(value);}
catch (std::exception &) {res = defaultValue;}
}
contextElement.emplace_back(0);
std::memcpy(&contextElement.back(), &res, sizeof res);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment