ROSE  0.11.145.0
Rose/BinaryAnalysis/Partitioner2/Exception.h
1 #ifndef ROSE_BinaryAnalysis_Partitioner2_Exception_H
2 #define ROSE_BinaryAnalysis_Partitioner2_Exception_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
7 #include <Rose/Exception.h>
8 
9 #include <stdexcept>
10 #include <string>
11 
12 namespace Rose {
13 namespace BinaryAnalysis {
14 namespace Partitioner2 {
15 
16 class Exception: public Rose::Exception {
17 public:
18  Exception(const std::string &mesg): Rose::Exception(mesg) {}
19  ~Exception() throw() {}
20 };
21 
22 class PlaceholderError: public Exception {
23  rose_addr_t startVa_;
24 public:
25  PlaceholderError(rose_addr_t startVa, const std::string &mesg)
26  : Exception(mesg), startVa_(startVa) {}
27  ~PlaceholderError() throw() {}
28  rose_addr_t startVa() const { return startVa_; }
29 };
30 
31 class BasicBlockError: public Exception {
32  BasicBlockPtr bblock_;
33 public:
34  BasicBlockError(const BasicBlockPtr&, const std::string &mesg);
35  ~BasicBlockError() throw();
36  BasicBlockPtr bblock() const;
37 };
38 
39 class DataBlockError: public Exception {
40  DataBlockPtr dblock_;
41 public:
42  DataBlockError(const DataBlockPtr&, const std::string &mesg);
43  ~DataBlockError() throw();
44  DataBlockPtr dblock() const;
45 };
46 
47 class FunctionError: public Exception {
48  FunctionPtr function_;
49 public:
50  FunctionError(const FunctionPtr&, const std::string &mesg);
51  ~FunctionError() throw();
52  FunctionPtr function() const;
53 };
54 
55 class FileError: public Exception {
56 public:
57  FileError(const std::string &mesg)
58  : Exception(mesg) {}
59  ~FileError() throw() {}
60 };
61 
62 } // namespace
63 } // namespace
64 } // namespace
65 
66 #endif
67 #endif
Main namespace for the ROSE library.
Base class for all ROSE exceptions.
Definition: Rose/Exception.h:9