diff --git a/src/bin/autfilt.cc b/src/bin/autfilt.cc index 196e05c5a..ff8b9bf56 100644 --- a/src/bin/autfilt.cc +++ b/src/bin/autfilt.cc @@ -391,7 +391,14 @@ main(int argc, char** argv) post.set_level(level); hoa_processor processor(post); - if (processor.run()) - return 2; + try + { + if (processor.run()) + return 2; + } + catch (const std::runtime_error& e) + { + error(2, 0, "%s", e.what()); + } return 0; } diff --git a/src/tgbatest/hoaparse.test b/src/tgbatest/hoaparse.test index a7258ac4d..34d61bc3a 100755 --- a/src/tgbatest/hoaparse.test +++ b/src/tgbatest/hoaparse.test @@ -717,3 +717,7 @@ input:4.7-242: unclosed string input:4.7-242: syntax error, unexpected end of file, expecting string autfilt: failed to read automaton from input EOF + +expecterr non-existant<