00001
00002
00014
00015
00016 #ifndef polybori_error_PBoRiError_h_
00017 #define polybori_error_PBoRiError_h_
00018
00019
00020 #include <polybori/pbori_defs.h>
00021 #include <exception>
00022
00023 BEGIN_NAMESPACE_PBORI
00024
00031 class PBoRiError:
00032 public std::exception, public CTypes {
00033
00034 public:
00036 typedef CTypes::errornum_type errornum_type;
00037
00039 typedef CTypes::errortext_type errortext_type;
00040
00042 typedef PBoRiError self;
00043
00045 PBoRiError(errornum_type err = CTypes::alright);
00046
00048 PBoRiError(const self&);
00049
00051 ~PBoRiError() throw();
00052
00054 errornum_type code() const;
00055
00057 errortext_type text() const;
00058
00060 const char* what() const throw() { return text(); }
00061
00062 protected:
00063 errornum_type error;
00064 };
00065
00066 END_NAMESPACE_PBORI
00067
00068 #endif // of #ifndef PBoRiError_h_