mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
Make z3::exception a subclass of std::exception
This commit is contained in:
parent
8973c18856
commit
58f3dce2be
|
@ -80,11 +80,12 @@ namespace z3 {
|
|||
/**
|
||||
\brief Exception used to sign API usage errors.
|
||||
*/
|
||||
class exception {
|
||||
class exception : public std::exception {
|
||||
std::string m_msg;
|
||||
public:
|
||||
exception(char const * msg):m_msg(msg) {}
|
||||
char const * msg() const { return m_msg.c_str(); }
|
||||
char const * what() const noexcept { return m_msg.c_str(); }
|
||||
friend std::ostream & operator<<(std::ostream & out, exception const & e);
|
||||
};
|
||||
inline std::ostream & operator<<(std::ostream & out, exception const & e) { out << e.msg(); return out; }
|
||||
|
|
Loading…
Reference in a new issue