Commit d3ddd510 authored by Mathieu Giraud's avatar Mathieu Giraud

core/tools.cpp: throw an exception when the seed is unknown

parent f10e2458
Pipeline #31702 canceled with stages
in 2 minutes and 57 seconds
......@@ -32,7 +32,12 @@ string expand_seed(const string &seed)
return expand_seed(DEFAULT_SEED);
if (seed.find(SEED_YES) == std::string::npos)
return seedMap[seed];
{
if (seedMap.find(seed) == seedMap.end())
throw invalid_argument("Unknown seed: " + seed);
else
return seedMap[seed];
}
return seed ;
}
......
Markdown is supported
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