diff options
| author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-11 22:40:01 +0000 | 
|---|---|---|
| committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-11 22:40:01 +0000 | 
| commit | 23c362c8d0952b9fa40e559f5045744a6b289d25 (patch) | |
| tree | 855a28e17c2c3b8a25f5fdccbb665fa7645b8ba2 /decoder | |
| parent | 83834db0ae728d758e2b572bff80ca56e1eec0e6 (diff) | |
itoa
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@529 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder')
| -rwxr-xr-x | decoder/apply_fsa_models.cc | 5 | 
1 files changed, 3 insertions, 2 deletions
| 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 <cassert>  #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); +  if (i<0 || i>=N_ALGORITHMS) +    throw std::runtime_error("Unknown ApplyFsaBy type id: "+itos(i)+" - legal types: "+all_names());    algorithm=i;  } | 
