GPLIB++
FatalException.h
Go to the documentation of this file.
1 #ifndef CFATALEXCEPTION_H_
2 #define CFATALEXCEPTION_H_
3 #include <stdexcept>
4 #include <string>
5 namespace gplib
6  {
7  //! The basic exception class for all errors that arise in gplib
8  /*! The FatalException class is thrown when there is a problem that cannot be fixed within the program
9  * It is derived from runtime_error to make error message handling easier.
10  */
11  class FatalException: public std::runtime_error
12  {
13  public:
14  //! The constructor takes the error description as an argument, just like std::runtime_error
15  FatalException(const std::string whatString) :
16  std::runtime_error(whatString)
17  {
18  }
19  ;
20  virtual ~FatalException() throw ()
21  {
22  }
23  ;
24  };
25  }
26 #endif /*CFATALEXCEPTION_H_*/
FatalException(const std::string whatString)
The constructor takes the error description as an argument, just like std::runtime_error.
The basic exception class for all errors that arise in gplib.