2021-04-14 22:35:07 +02:00
|
|
|
Exceptions
|
|
|
|
|
==========
|
|
|
|
|
|
2021-04-21 10:21:34 -07:00
|
|
|
The cvc5 API communicates certain errors using exceptions. We broadly
|
2021-04-15 13:04:55 -07:00
|
|
|
distinguish two types of exceptions: :cpp:class:`CVC5ApiException
|
2022-03-30 19:30:21 -07:00
|
|
|
<cvc5::CVC5ApiException>` and :cpp:class:`CVC5ApiRecoverableException
|
|
|
|
|
<cvc5::CVC5ApiRecoverableException>` (which is derived from
|
|
|
|
|
:cpp:class:`CVC5ApiException <cvc5::CVC5ApiException>`).
|
2021-04-14 22:35:07 +02:00
|
|
|
|
2021-04-15 13:04:55 -07:00
|
|
|
If any method fails with a :cpp:class:`CVC5ApiRecoverableException
|
2022-03-30 19:30:21 -07:00
|
|
|
<cvc5::CVC5ApiRecoverableException>`, the solver behaves as if the failing
|
2021-04-14 22:35:07 +02:00
|
|
|
method was not called. The solver can still be used safely.
|
|
|
|
|
|
2021-04-15 13:04:55 -07:00
|
|
|
If, however, a method fails with a :cpp:class:`CVC5ApiException
|
2022-03-30 19:30:21 -07:00
|
|
|
<cvc5::CVC5ApiException>`, the associated object may be in an unsafe state
|
2021-04-14 22:35:07 +02:00
|
|
|
and it should no longer be used.
|
|
|
|
|
|
2024-07-12 09:16:47 -07:00
|
|
|
If the :cpp:class:`cvc5::parser::InputParser` encounters an error, it will
|
|
|
|
|
throw a :cpp:class:`cvc5::parser::ParserException
|
|
|
|
|
<cvc5::parser::ParserException>`.
|
|
|
|
|
If thrown, API objects can still be used
|
2021-04-14 22:35:07 +02:00
|
|
|
|
2022-03-30 19:30:21 -07:00
|
|
|
.. doxygenclass:: cvc5::CVC5ApiException
|
2021-04-14 22:35:07 +02:00
|
|
|
:project: cvc5
|
|
|
|
|
:members:
|
|
|
|
|
:undoc-members:
|
|
|
|
|
|
2022-03-30 19:30:21 -07:00
|
|
|
.. doxygenclass:: cvc5::CVC5ApiRecoverableException
|
2021-04-14 22:35:07 +02:00
|
|
|
:project: cvc5
|
|
|
|
|
:members:
|
|
|
|
|
:undoc-members:
|
2024-07-12 09:16:47 -07:00
|
|
|
|
|
|
|
|
.. doxygenclass:: cvc5::parser::ParserException
|
|
|
|
|
:project: cvc5
|
|
|
|
|
:members:
|
|
|
|
|
:undoc-members:
|