Skip to content

Commit 25c2339

Browse files
Add invalid_source_file_exceptiont
This exception was added to indicate that one or more of the input files we have has a problem that prevents us from working with it, such as being syntactically invalid.
1 parent 251245e commit 25c2339

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/util/exception_utils.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,8 @@ std::string analysis_exceptiont::what() const
8686
{
8787
return reason;
8888
}
89+
90+
std::string invalid_source_file_exceptiont::what() const
91+
{
92+
return reason;
93+
}

src/util/exception_utils.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,16 @@ class analysis_exceptiont : public cprover_exception_baset
120120
std::string reason;
121121
};
122122

123+
/// Thrown when we can't handle something in an input source file.
124+
/// For example, if we get C source code that is not syntactically valid
125+
/// or that has type errors.
126+
class invalid_source_file_exceptiont : public cprover_exception_baset
127+
{
128+
public:
129+
std::string what() const override;
130+
131+
private:
132+
std::string reason;
133+
};
134+
123135
#endif // CPROVER_UTIL_EXCEPTION_UTILS_H

0 commit comments

Comments
 (0)