summaryrefslogtreecommitdiff
path: root/decoder/decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r--decoder/decoder.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc
index 4ce2ba86..487c7635 100644
--- a/decoder/decoder.cc
+++ b/decoder/decoder.cc
@@ -965,14 +965,14 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) {
{
ReadFile rf(writer.fname_);
bool succeeded = HypergraphIO::ReadFromJSON(rf.stream(), &new_hg);
- assert(succeeded);
+ if (!succeeded) abort();
}
new_hg.Union(forest);
bool succeeded = writer.Write(new_hg, false);
- assert(succeeded);
+ if (!succeeded) abort();
} else {
bool succeeded = writer.Write(forest, false);
- assert(succeeded);
+ if (!succeeded) abort();
}
}
@@ -1052,14 +1052,14 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) {
{
ReadFile rf(writer.fname_);
bool succeeded = HypergraphIO::ReadFromJSON(rf.stream(), &new_hg);
- assert(succeeded);
+ if (!succeeded) abort();
}
new_hg.Union(forest);
bool succeeded = writer.Write(new_hg, false);
- assert(succeeded);
+ if (!succeeded) abort();
} else {
bool succeeded = writer.Write(forest, false);
- assert(succeeded);
+ if (!succeeded) abort();
}
}
if (aligner_mode && !output_training_vector)