ROSE  0.11.50.0
Rose/BinaryAnalysis/ModelChecker/Exception.h
1 #ifndef ROSE_BinaryAnalysis_ModelChecker_Exception_H
2 #define ROSE_BinaryAnalysis_ModelChecker_Exception_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #include <Rose/BinaryAnalysis/ModelChecker/Types.h>
7 
8 #include <Rose/Exception.h>
9 
10 namespace Rose {
11 namespace BinaryAnalysis {
12 namespace ModelChecker {
13 
15 class Exception: public Rose::Exception {
16 public:
18  explicit Exception(const std::string &s)
19  : Rose::Exception(s) {}
20 
21  ~Exception() throw() {}
22 };
23 
29 class ParseError: public Exception {
30 public:
32  ParseError(const boost::filesystem::path &fileName, const std::string &mesg)
33  : Exception(fileName.empty() ? mesg : fileName.string() + ": " + mesg) {}
34 
35  ~ParseError() throw() {}
36 };
37 
38 } // namespace
39 } // namespace
40 } // namespace
41 
42 #endif
43 #endif
Main namespace for the ROSE library.
ParseError(const boost::filesystem::path &fileName, const std::string &mesg)
Construct an exception with an error messsage.
Exception(const std::string &s)
Construct an exception with an error message.
Base class for all ROSE exceptions.
Definition: Rose/Exception.h:9