Skip to content
Snippets Groups Projects
Commit 9ff58bbd authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

error msgs

parent 3ec352da
Branches
Tags
No related merge requests found
...@@ -813,13 +813,16 @@ double Msg::GetOnelabNumber(std::string name) ...@@ -813,13 +813,16 @@ double Msg::GetOnelabNumber(std::string name)
#else #else
_onelabClient->get(numbers, name); _onelabClient->get(numbers, name);
#endif #endif
if(numbers.empty()) if(numbers.empty()){
Msg::Error("Unknown ONELAB parameter '%s'", name.c_str()); Msg::Error("Unknown ONELAB number parameter '%s'", name.c_str());
return 0.;
}
else else
return numbers[0].getValue(); return numbers[0].getValue();
} }
return 0.;
#endif #endif
Msg::Error("GetNumber requires a ONELAB client");
return 0.;
} }
std::string Msg::GetOnelabString(std::string name) std::string Msg::GetOnelabString(std::string name)
...@@ -832,12 +835,15 @@ std::string Msg::GetOnelabString(std::string name) ...@@ -832,12 +835,15 @@ std::string Msg::GetOnelabString(std::string name)
#else #else
_onelabClient->get(strings, name); _onelabClient->get(strings, name);
#endif #endif
if(strings.empty()) if(strings.empty()){
Msg::Error("Unknown ONELAB parameter '%s'", name.c_str()); Msg::Error("Unknown ONELAB string parameter '%s'", name.c_str());
return "";
}
else else
return strings[0].getValue(); return strings[0].getValue();
} }
#endif #endif
Msg::Error("GetString requires a ONELAB client");
return ""; return "";
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment