Eradicating CHECK

This commit is contained in:
Kenneth Heafield 2014-01-02 11:34:04 -05:00
parent c4ec78b817
commit 9af5c12aa2

View File

@ -51,6 +51,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "Manager.h"
#include "StaticData.h"
#include "util/exception.hh"
using namespace std;
using namespace Moses;
@ -68,7 +69,7 @@ public:
/** Add a parameter with key, command line argument, and default value */
void addParam(gridkey key, const string& arg, float defaultValue) {
m_args[arg] = key;
CHECK(m_grid.find(key) == m_grid.end());
UTIL_THROW_IF2(m_grid.find(key) != m_grid.end(), "Duplicate parameter " << arg);
m_grid[key].push_back(defaultValue);
}