fixed another bug related to the handling of feature names

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1822 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
nicolabertoldi 2008-06-05 11:30:37 +00:00
parent 44d7e0e0f7
commit 930e67c5e3

View File

@ -65,7 +65,7 @@ public:
bool existsFeatureNames(){ return (idx2featname_.size() > 0)?true:false; };
std::string getFeatureName(size_t idx){
if (idx >= idx2featname_.size())
throw runtime_error("Error: you required the " + idx + "-th feature, but there are only " + (idx2featname_.size()) + " features");
throw runtime_error("Error: you required an too big index");
return idx2featname_[idx];
};
size_t getFeatureIndex(const std::string& name){