Rivet
1.8.0
|
00001 #ifndef RIVET_EXCEPTIONS_HH 00002 #define RIVET_EXCEPTIONS_HH 00003 00004 #include <string> 00005 #include <exception> 00006 #include <stdexcept> 00007 00008 namespace Rivet { 00009 00010 00012 class Error : public std::runtime_error { 00013 public: 00014 Error(const std::string& what) : std::runtime_error(what) {} 00015 }; 00016 00017 00019 typedef Error Exception; 00020 00021 00023 class RangeError : public Error { 00024 public: 00025 RangeError(const std::string& what) : Error(what) {} 00026 }; 00027 00028 00030 class LogicError : public Error { 00031 public: 00032 LogicError(const std::string& what) : Error(what) {} 00033 }; 00034 00035 00037 class PidError : public Error { 00038 public: 00039 PidError(const std::string& what) : Error(what) {} 00040 }; 00041 00042 00046 class WeightError : public Error { 00047 public: 00048 WeightError(const std::string& what) : Error(what) {} 00049 }; 00050 00051 00052 } 00053 00054 #endif