Exception
class
bitwuzla::Exception
The C++ API of Bitwuzla communicates errors via exceptions. The base class for
all exceptions is bitwuzla::Exception
.
Configuration errors that occur while setting up bitwuzla::Options
throw a bitwuzla::option::Exception
, and errors encountered while
parsing throw a bitwuzla::parser::Exception
.
In general, exceptions indicate that the associated object may be in an unsafe
state and should no longer be used. An exception to this rule are option
exceptions, which are thrown before the state of the associated option object
is modified and thus allow recovering from configuration errors. That is,
if a bitwuzla::option::Exception
is throw, the associated
bitwuzla::Options
object can still be used.
namespace bitwuzla {
-
class Exception : public std::exception
The base class for exception thrown via the API.
The C++ API of Bitwuzla communicates all errors via exceptions. In general, exceptions of this type indicate that the associated object may be in an unsafe state and should no longer be used. An exception are exceptions that indicate configuration option errors (
option::Exception
), which allow to continue using the associatedOptions
object.Subclassed by bitwuzla::option::Exception, bitwuzla::parser::Exception
Public Functions
-
Exception(const std::string &msg)
Constructor.
- Parameters:
msg – The exception message.
-
Exception(const std::stringstream &stream)
Constructor.
- Parameters:
stream – The exception message given as a std::stringstream.
-
const std::string &msg() const
Get the exception message.
- Returns:
The exception message.
-
Exception(const std::string &msg)
namespace bitwuzla::option {
-
class Exception : public bitwuzla::Exception
Exception thrown when errors occur while configuring options.
Note
Exceptions of these type allow to continue using the associated
Options
object after they were thrown.
}
namespace bitwuzla::parser {
-
class Exception : public bitwuzla::Exception
Exception thrown when errors occur during parsing.
Note
Exceptions of these type are non-recoverable. It is not safe to continue using the associated object after they are thrown.
}
}