File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 88
99#include " exception_utils.h"
1010
11+ #include < utility>
12+
1113std::string invalid_user_input_exceptiont::what () const noexcept
1214{
1315 std::string res;
@@ -18,3 +20,11 @@ std::string invalid_user_input_exceptiont::what() const noexcept
1820 res += correct_input + " \n " ;
1921 return res;
2022}
23+
24+ deserialization_exceptiont::deserialization_exceptiont (std::string message)
25+ : message(std::move(message))
26+ {}
27+
28+ std::string deserialization_exceptiont::what () const noexcept {
29+ return message;
30+ }
Original file line number Diff line number Diff line change @@ -52,4 +52,13 @@ class system_exceptiont
5252 }
5353};
5454
55+ class deserialization_exceptiont
56+ {
57+ public:
58+ explicit deserialization_exceptiont (std::string message);
59+ std::string what () const noexcept ;
60+ private:
61+ std::string message;
62+ };
63+
5564#endif // CPROVER_UTIL_EXCEPTION_UTILS_H
Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ int parse_options_baset::main()
8181 std::cerr << e.what () << " \n " ;
8282 return CPROVER_EXIT_EXCEPTION;
8383 }
84+ catch (const deserialization_exceptiont &e)
85+ {
86+ std::cerr << e.what () << ' \n ' ;
87+ return CPROVER_EXIT_EXCEPTION;
88+ }
8489
8590 return CPROVER_EXIT_SUCCESS;
8691}
You can’t perform that action at this time.
0 commit comments