NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Files Functions Variables Macros Pages
Exceptions.h
1 // Exceptions.h
2 //
3 // Author : Jeromy Tompkins
4 // Date : 8/14/2013
5 
6 #ifndef EXCEPTIONS_H
7 #define EXCEPTIONS_H
8 
9 #include <string>
10 #include <sstream>
11 #include <TObject.h>
12 
13 namespace TrAnal
14 {
15 
16 // class ProcessorException
17 // {
18 // public:
19 // ProcessorException() throw() {}
20 //
21 // ProcessorException(const ProcessorException& exc) throw() {}
22 //
23 // virtual ~ProcessorException() throw() {}
24 //
25 // virtual const char* what() throw() { return "Processor exception"; }
26 //
27 // ClassDef(ProcessorException,0);
28 // };
29 
30 
31  class AlgorithmOutOfBoundsException// : public ProcessorException
32  {
33  private:
34  std::string fMessage;
35 
36  public:
37  AlgorithmOutOfBoundsException(const unsigned int algopoint, const unsigned int valid_low, const unsigned int valid_high) throw();
38 
40 
41  AlgorithmOutOfBoundsException& operator=(const AlgorithmOutOfBoundsException& exc) throw();
42 
44 
45  const char* what() const throw();
46 
50  };
51 
52  class InvalidResultException // : public ProcessorException
53  {
54  private:
55  std::string fMessage;
56 
57  public:
58  InvalidResultException(const std::string& message) throw();
59 
61 
62  InvalidResultException& operator=(const InvalidResultException& exc) throw();
63 
64  ~InvalidResultException() throw();
65 
66  const char* what() const throw();
67 
69  ClassDef(InvalidResultException,0);
71 
72  };
73 
74 } // end namespace
75 
76 #endif
77