Commit d2c8c928 authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Added warnings/errors in NLOpt optimizers

parent 484f2cfd
......@@ -79,9 +79,11 @@ namespace limbo {
}
catch (nlopt::roundoff_limited& e) {
// In theory it's ok to ignore this error
std::cerr << "[NLOptGrad]: " << e.what() << std::endl;
}
catch (std::invalid_argument& e) {
// In theory it's ok to ignore this error
std::cerr << "[NLOptGrad]: " << e.what() << std::endl;
}
return Eigen::VectorXd::Map(x.data(), x.size());
......
......@@ -96,9 +96,11 @@ namespace limbo {
}
catch (nlopt::roundoff_limited& e) {
// In theory it's ok to ignore this error
std::cerr << "[NLOptNoGrad]: " << e.what() << std::endl;
}
catch (std::invalid_argument& e) {
// In theory it's ok to ignore this error
std::cerr << "[NLOptNoGrad]: " << e.what() << std::endl;
}
return Eigen::VectorXd::Map(x.data(), x.size());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment