summaryrefslogtreecommitdiff
path: root/src/api/cpp/cvc5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/cpp/cvc5.cpp')
-rw-r--r--src/api/cpp/cvc5.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/api/cpp/cvc5.cpp b/src/api/cpp/cvc5.cpp
index d41af938a..b1fb80336 100644
--- a/src/api/cpp/cvc5.cpp
+++ b/src/api/cpp/cvc5.cpp
@@ -60,6 +60,7 @@
#include "options/option_exception.h"
#include "options/options.h"
#include "options/options_public.h"
+#include "options/outputc.h"
#include "options/smt_options.h"
#include "proof/unsat_core.h"
#include "smt/model.h"
@@ -7937,6 +7938,21 @@ Statistics Solver::getStatistics() const
return Statistics(d_smtEngine->getStatisticsRegistry());
}
+std::ostream& Solver::getOutput(const std::string& tag) const
+{
+ // `Output(tag)` may raise an `OptionException`, which we do not want to
+ // forward as such. We thus do not use the standard exception handling macros
+ // here but roll our own.
+ try
+ {
+ return Output(tag);
+ }
+ catch (const cvc5::Exception& e)
+ {
+ throw CVC5ApiException("Invalid output tag " + tag);
+ }
+}
+
} // namespace api
} // namespace cvc5
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback