Rivet: /Users/chrisg/software/rivet/include/Rivet/Tools/Exceptions.hh Source File

| Rivet 3.1.9

Exceptions.hh
1#ifndef RIVET_EXCEPTIONS_HH
2#define RIVET_EXCEPTIONS_HH
3
4#include <string>
5#include <exception>
6#include <stdexcept>
7
8namespace Rivet {
9
10
12 struct Error : public std::runtime_error {
13 Error(const std::string& what) : std::runtime_error(what) {}
14 };
15
16
18 typedef Error Exception;
19
20
22 struct RangeError : public Error {
23 RangeError(const std::string& what) : Error(what) {}
24 };
25
26
28 struct LogicError : public Error {
29 LogicError(const std::string& what) : Error(what) {}
30 };
31
32
34 struct PidError : public Error {
35 PidError(const std::string& what) : Error(what) {}
36 };
37
38
40 struct InfoError : public Error {
41 InfoError(const std::string& what) : Error(what) {}
42 };
43
44
49 struct WeightError : public Error {
50 WeightError(const std::string& what) : Error(what) {}
51 };
52
53
55 struct UserError : public Error {
56 UserError(const std::string& what) : Error(what) {}
57 };
58
59
61 struct LookupError : public Error {
62 LookupError(const std::string& what) : Error(what) {}
63 };
64
65
67 struct IOError : public Error {
68 IOError(const std::string& what) : Error(what) {}
69 };
70
72 struct ReadError : public IOError {
73 ReadError(const std::string& what) : IOError(what) {}
74 };
75
77 struct WriteError : public IOError {
78 WriteError(const std::string& what) : IOError(what) {}
79 };
80
81
82}
83
84#endif
Rivet
Definition MC_Cent_pPb.hh:10
Rivet::Exception
Error Exception
Rivet::Exception is a synonym for Rivet::Error.
Definition Exceptions.hh:18
Rivet::Error
Generic runtime Rivet error.
Definition Exceptions.hh:12
Rivet::IOError
Error for I/O failures.
Definition Exceptions.hh:67
Rivet::InfoError
Error specialisation for failures relating to analysis info.
Definition Exceptions.hh:40
Rivet::LogicError
Error specialisation for places where alg logic has failed.
Definition Exceptions.hh:28
Rivet::LookupError
Error relating to looking up analysis objects in the register.
Definition Exceptions.hh:61
Rivet::PidError
Error specialisation for failures relating to particle ID codes.
Definition Exceptions.hh:34
Rivet::RangeError
Error for e.g. use of invalid bin ranges.
Definition Exceptions.hh:22
Rivet::ReadError
Error for read failures.
Definition Exceptions.hh:72
Rivet::UserError
Error specialisation for where the problem is between the chair and the computer.
Definition Exceptions.hh:55
Rivet::WeightError
Errors relating to event/bin weights.
Definition Exceptions.hh:49
Rivet::WriteError
Error for write failures.
Definition Exceptions.hh:77