From 5359400c08f817f8c980c034fa1de4d55a43a65c Mon Sep 17 00:00:00 2001 From: graehl Date: Wed, 11 Aug 2010 22:40:01 +0000 Subject: itoa git-svn-id: https://ws10smt.googlecode.com/svn/trunk@529 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/apply_fsa_models.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'decoder') diff --git a/decoder/apply_fsa_models.cc b/decoder/apply_fsa_models.cc index 3a1e8050..1c30eb90 100755 --- a/decoder/apply_fsa_models.cc +++ b/decoder/apply_fsa_models.cc @@ -9,6 +9,7 @@ #include #include "cfg.h" #include "hg_cfg.h" +#include "utoa.h" using namespace std; @@ -107,8 +108,8 @@ ApplyFsaBy::ApplyFsaBy(std::string const& n, int pop_limit) : pop_limit(pop_limi } ApplyFsaBy::ApplyFsaBy(int i, int pop_limit) : pop_limit(pop_limit) { - assert (i>=0); - assert (i=N_ALGORITHMS) + throw std::runtime_error("Unknown ApplyFsaBy type id: "+itos(i)+" - legal types: "+all_names()); algorithm=i; } -- cgit v1.2.3