CARMA C++
SharedMemoryException.h
Go to the documentation of this file.
1 #ifndef CARMA_ANTENNA_BIMA_SHAREDMEMORY_EXCEPTION_H
2 #define CARMA_ANTENNA_BIMA_SHAREDMEMORY_EXCEPTION_H
3 
43 #include <string>
44 #include <iosfwd>
45 
47 
48 
49 namespace carma
50 {
51  namespace antenna
52  {
53  namespace bima
54  {
55 
61 public:
62 
71  SharedMemoryException(const std::string& msg, const char* filename, int lineNo);
72 
73 
85  SharedMemoryException(const std::ostringstream& msg,
86  const char* filename, int lineNo);
87 
88 
93  SharedMemoryException( const char *name );
94 
100  SharedMemoryException(const SharedMemoryException& shmException);
101 
105  virtual ~SharedMemoryException() throw();
106 
107 
112  virtual const char* what() const throw();
113 
114 
120  void report() const;
121 
126  std::string getErrorMessage() const ;
127 
128  void setName( const char *name );
129  const char *getName();
130 
131  std::string *_name;
132 
133 protected:
138 
139 private:
140  char* errorMsg_; // Full message w/line# and file name
141  void makeCharStrings(const char* filename);
142  // Make a new copy of a character string
143  char* makeCopy(const char* string) const;
144 
145 
146 
147 
148 };
149 
150 } } } // End namespace carma::antenna::bima
151 
152 
153 #endif // CARMA_ANTENNA_BIMA_SHAREDMEMORY_EXCEPTION_H
virtual const char * what() const
Get the error message; overrides BaseException &amp; std::exception.what()
This is the include file for Carma exception handling utilities.
Base exception class for managing carma errors.
Definition: BaseException.h:48
void report() const
Report error to standard err.
SharedMemoryException()
Default constructor.
std::string getErrorMessage() const
Get the full error message, including line number and file name.
Exception class for errors The exception comes with a text string that can be printed or logged...