File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -33,4 +33,23 @@ class invalid_user_input_exceptiont
33
33
std::string what () const noexcept ;
34
34
};
35
35
36
+ class system_exceptiont
37
+ {
38
+ private:
39
+ std::string reason;
40
+
41
+ public:
42
+ system_exceptiont (const std::string &reason) : reason(reason)
43
+ {
44
+ }
45
+
46
+ std::string what () const noexcept
47
+ {
48
+ std::string res;
49
+ res += " System Exception\n " ;
50
+ res += " Reason: " + reason + " \n " ;
51
+ return res;
52
+ }
53
+ };
54
+
36
55
#endif // CPROVER_UTIL_EXCEPTION_UTILS_H
Original file line number Diff line number Diff line change @@ -76,6 +76,12 @@ int parse_options_baset::main()
76
76
std::cerr << e.what () << " \n " ;
77
77
return CPROVER_EXIT_USAGE_ERROR;
78
78
}
79
+ catch (system_exceptiont &e)
80
+ {
81
+ std::cerr << e.what () << " \n " ;
82
+ return CPROVER_EXIT_EXCEPTION;
83
+ }
84
+
79
85
return CPROVER_EXIT_SUCCESS;
80
86
}
81
87
You can’t perform that action at this time.
0 commit comments