Skip to content

Add a virtual destructor to cprover_exception_baset #3137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/util/exception_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ Author: Fotis Koutoulakis, fotis.koutoulakis@diffblue.com
/// Base class for exceptions thrown in the cprover project.
/// Intended to be used as a convenient way to have a
/// "catch all and report errors" from application entry points.
/// Note that the reason we use a custom base class as opposed to
/// std::exception or one of its derivates to avoid them being accidentally
/// caught by code expecting standard exceptions to be only thrown by the
/// standard library.
class cprover_exception_baset
{
public:
/// A human readable description of what went wrong.
/// For readability, implementors should not add a leading
/// or trailing newline to this description.
virtual std::string what() const = 0;
virtual ~cprover_exception_baset() = default;
};

/// Thrown when users pass incorrect command line arguments,
Expand Down