diff --git a/src/solvers/smt2/smt2_dec.cpp b/src/solvers/smt2/smt2_dec.cpp index 19f57ab9a55..e4c8add535b 100644 --- a/src/solvers/smt2/smt2_dec.cpp +++ b/src/solvers/smt2/smt2_dec.cpp @@ -138,10 +138,12 @@ decision_proceduret::resultt smt2_dect::dec_solve(const exprt &assumption) int res = run(argv[0], argv, stdin_filename, temp_file_stdout(), temp_file_stderr()); - if(res<0) + if(res != 0) { messaget log{message_handler}; - log.error() << "error running SMT2 solver" << messaget::eom; + std::ifstream stderr_stream(temp_file_stderr()); + log.error() << "error running SMT2 solver: " << stderr_stream.rdbuf() + << messaget::eom; return decision_proceduret::resultt::D_ERROR; }