Exceptions.hh
Go to the documentation of this file.
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 00011 /// @brief Generic runtime Rivet error. 00012 struct Error : public std::runtime_error { 00013 Error(const std::string& what) : std::runtime_error(what) {} 00014 }; 00015 00016 00017 /// @brief Rivet::Exception is a synonym for Rivet::Error. 00018 typedef Error Exception; 00019 00020 00021 /// @brief Error for e.g. use of invalid bin ranges. 00022 struct RangeError : public Error { 00023 RangeError(const std::string& what) : Error(what) {} 00024 }; 00025 00026 00027 /// @brief Error specialisation for places where alg logic has failed. 00028 struct LogicError : public Error { 00029 LogicError(const std::string& what) : Error(what) {} 00030 }; 00031 00032 00033 /// @brief Error specialisation for failures relating to particle ID codes. 00034 struct PidError : public Error { 00035 PidError(const std::string& what) : Error(what) {} 00036 }; 00037 00038 00039 /// @brief Error specialisation for failures relating to analysis info. 00040 struct InfoError : public Error { 00041 InfoError(const std::string& what) : Error(what) {} 00042 }; 00043 00044 00045 /// @brief Errors relating to event/bin weights 00046 /// 00047 /// Arises in computing statistical quantities because e.g. the bin 00048 /// weight is zero or negative. 00049 struct WeightError : public Error { 00050 WeightError(const std::string& what) : Error(what) {} 00051 }; 00052 00053 00054 /// @brief Error specialisation for where the problem is between the chair and the computer. 00055 struct UserError : public Error { 00056 UserError(const std::string& what) : Error(what) {} 00057 }; 00058 00059 00060 } 00061 00062 #endif Generated on Tue Dec 13 2016 16:32:37 for The Rivet MC analysis system by ![]() |