Skip to content

Commit

Permalink
add more descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
keon committed Jun 7, 2016
1 parent b86e427 commit 92f3cd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mlpack/core/util/cli_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ void CLI::Add(const std::string& identifier,
const std::string& alias,
bool required)
{
// Temporary outstream object for detecting duplicate identifiers
util::PrefixedOutStream outstr(std::cerr,
BASH_RED "[FATAL] " BASH_CLEAR, false, true /* fatal */);

// identifier and alias maps
gmap_t& gmap = GetSingleton().globalValues;
amap_t& amap = GetSingleton().aliasValues;

// if found in current map, print fatal error and terminat program.
if (gmap.count(identifier))
outstr << "Parameter --" << identifier << "(-" << alias << ") "
<< "is defined multiple times with same identifiers." << std::endl;
Expand Down

0 comments on commit 92f3cd1

Please sign in to comment.