Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
Exceptions.hpp
Go to the documentation of this file.
1 
7 #ifndef __EXCEPTION_HPP__
8 #define __EXCEPTION_HPP__
9 
10 #include <stdexcept>
11 #include <string>
12 
16 class GeneralException : public std::exception {
17 public:
20 
23  explicit GeneralException(const std::string& msg)
24  : exception(), message_(msg) {}
25 
27  virtual ~GeneralException() throw() {}
28 
31  virtual const char* what() const throw() {
32  return message_.c_str();
33  }
34 
35 protected:
36  const std::string message_;
37 };
38 
44 class GeneralWarning : public std::exception {
45 public:
48 
51  explicit GeneralWarning(const std::string& msg)
52  : exception(), message_(msg) {}
53 
55  virtual ~GeneralWarning() throw() {}
56 
59  virtual const char* what() const throw() {
60  return message_.c_str();
61  }
62 
63 protected:
64  const std::string message_;
65 };
66 
68 class IOException : public GeneralException {
69 public:
72  IOException(const std::string& msg) :
73  GeneralException(msg) {}
74 };
75 
79 public:
82  TreeCorrelatorException(const std::string& msg) :
83  GeneralException(msg) {}
84 };
85 
88 public:
91  ConversionException(const std::string& msg) :
92  GeneralException(msg) {}
93 };
94 
97 public:
100  HistogramException(const std::string& msg) :
101  GeneralException(msg) {}
102 };
103 
106 public:
109  NotImplemented(const std::string& msg) :
110  GeneralException(msg) {}
111 };
112 
113 #endif
Warning with customizable message.
Definition: Exceptions.hpp:44
const std::string message_
The message that is to be printed.
Definition: Exceptions.hpp:64
Use this exception if feature is not implemented yet.
Definition: Exceptions.hpp:105
virtual ~GeneralException()
Definition: Exceptions.hpp:27
virtual ~GeneralWarning()
Definition: Exceptions.hpp:55
Exception in the TreeCorrelator, both reading and parsing XML file, as well as creating new places...
Definition: Exceptions.hpp:78
GeneralException()
Definition: Exceptions.hpp:19
virtual const char * what() const
Definition: Exceptions.hpp:59
GeneralException(const std::string &msg)
Definition: Exceptions.hpp:23
ConversionException(const std::string &msg)
Definition: Exceptions.hpp:91
Exception with customizable message.
Definition: Exceptions.hpp:16
virtual const char * what() const
Definition: Exceptions.hpp:31
Read/write exception for all file operation related tasks.
Definition: Exceptions.hpp:68
GeneralWarning(const std::string &msg)
Definition: Exceptions.hpp:51
GeneralWarning()
Definition: Exceptions.hpp:47
HistogramException(const std::string &msg)
Definition: Exceptions.hpp:100
Error in conversion of string to numerical or boolean value.
Definition: Exceptions.hpp:87
IOException(const std::string &msg)
Definition: Exceptions.hpp:72
TreeCorrelatorException(const std::string &msg)
Definition: Exceptions.hpp:82
const std::string message_
The message that is to be printed.
Definition: Exceptions.hpp:36
Error in creating or accesing histograms.
Definition: Exceptions.hpp:96
NotImplemented(const std::string &msg)
Definition: Exceptions.hpp:109