From 3221f419f05d8cd7ad90b5974c8f9bf85c88ccdb Mon Sep 17 00:00:00 2001 From: Hannes Steffenhagen Date: Thu, 4 Oct 2018 15:04:03 +0100 Subject: [PATCH] Add constructor with reason to invalid_source_file_exceptiont --- src/util/exception_utils.cpp | 6 ++++++ src/util/exception_utils.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/util/exception_utils.cpp b/src/util/exception_utils.cpp index 411cc3e23f1..54f1884e4a9 100644 --- a/src/util/exception_utils.cpp +++ b/src/util/exception_utils.cpp @@ -87,6 +87,12 @@ std::string analysis_exceptiont::what() const return reason; } +invalid_source_file_exceptiont::invalid_source_file_exceptiont( + std::string reason) + : reason(std::move(reason)) +{ +} + std::string invalid_source_file_exceptiont::what() const { return reason; diff --git a/src/util/exception_utils.h b/src/util/exception_utils.h index 0dcb74be6dd..20d9f38a91a 100644 --- a/src/util/exception_utils.h +++ b/src/util/exception_utils.h @@ -126,6 +126,7 @@ class analysis_exceptiont : public cprover_exception_baset class invalid_source_file_exceptiont : public cprover_exception_baset { public: + explicit invalid_source_file_exceptiont(std::string reason); std::string what() const override; private: