3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-29 06:28:57 +00:00

use std::exception as base class to z3_exception

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-11-04 11:08:15 -08:00
parent 1957b4d991
commit 92065462b4
60 changed files with 109 additions and 111 deletions

View file

@ -19,11 +19,11 @@ Notes:
#pragma once
#include<string>
#include<exception>
class z3_exception {
class z3_exception : public std::exception {
public:
virtual ~z3_exception() = default;
virtual char const * msg() const = 0;
virtual unsigned error_code() const;
bool has_error_code() const;
};
@ -32,7 +32,7 @@ class z3_error : public z3_exception {
unsigned m_error_code;
public:
z3_error(unsigned error_code);
char const * msg() const override;
char const * what() const override;
unsigned error_code() const override;
};
@ -42,6 +42,6 @@ public:
struct fmt {};
default_exception(std::string && msg) : m_msg(std::move(msg)) {}
default_exception(fmt, char const* msg, ...);
char const * msg() const override;
char const * what() const override;
};