/[PAMELA software]/chewbacca/event/Exception.h
ViewVC logotype

Diff of /chewbacca/event/Exception.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Tue Sep 23 07:19:52 2008 UTC revision 1.2 by mocchiut, Tue Aug 4 13:58:17 2009 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /repository/event/Exception.h,v $   * $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/event/Exception.h,v $
3   * $Id: Exception.h,v 1.3 2008-03-04 18:07:25 messineo Exp $   * $Id: Exception.h,v 1.1.1.1 2008/09/23 07:19:52 mocchiut Exp $
4   * $Author: messineo $   * $Author: mocchiut $
5   *   *
6   * Header file for the exceptions of Pamela.   * Header file for the exceptions of Pamela.
7   */   */
# Line 33  namespace pamela { Line 33  namespace pamela {
33    //marco:    //marco:
34    class CalibException: public Exception {    class CalibException: public Exception {
35    public:    public:
36            CalibException::CalibException(const char* msg):  Exception(msg) {}            CalibException(const char* msg):  Exception(msg) {}
37            CalibException::~CalibException () throw(){ }            ~CalibException () throw(){ }
38    };    };
39        
40    //marco:    //marco:
41    class WrongCRCException_PKTUsed: public Exception {    class WrongCRCException_PKTUsed: public Exception {
42    public:    public:
43            WrongCRCException_PKTUsed::WrongCRCException_PKTUsed(const char* msg):  Exception(msg) {}            WrongCRCException_PKTUsed(const char* msg):  Exception(msg) {}
44            WrongCRCException_PKTUsed::~WrongCRCException_PKTUsed () throw(){ }            ~WrongCRCException_PKTUsed () throw(){ }
45    };    };
46    
47    //marco:      //marco:  
48    class FatalException: public Exception {    class FatalException: public Exception {
49    public:    public:
50            FatalException::FatalException(const char* msg):  Exception(msg) {}            FatalException(const char* msg):  Exception(msg) {}
51            FatalException::~FatalException () throw(){ }            ~FatalException () throw(){ }
52    };    };
53        
54    class NotFoundEnvironmentVarException: public Exception {    class NotFoundEnvironmentVarException: public Exception {
55      public:      public:
56        NotFoundEnvironmentVarException::NotFoundEnvironmentVarException(const char* msg):  Exception(msg) {}        NotFoundEnvironmentVarException(const char* msg):  Exception(msg) {}
57        NotFoundEnvironmentVarException::~NotFoundEnvironmentVarException () throw(){ }        ~NotFoundEnvironmentVarException () throw(){ }
58      };      };
59    
60    class UnidentifiedPacketException: public Exception {    class UnidentifiedPacketException: public Exception {
61    private:    private:
62      UINT8     pktId;      UINT8     pktId;
63    public:    public:
64      UnidentifiedPacketException::UnidentifiedPacketException(UINT8 id):      UnidentifiedPacketException(UINT8 id):
65      Exception("Unidentified PacketType - Id: ") {      Exception("Unidentified PacketType - Id: ") {
66          pktId = id;          pktId = id;
67      }      }
68      UnidentifiedPacketException::~UnidentifiedPacketException () throw(){ }      ~UnidentifiedPacketException () throw(){ }
69      const char* UnidentifiedPacketException::print () const throw () {      const char* print () const throw () {
70          sprintf((char*)buff," %s 0x%x", message, pktId);          sprintf((char*)buff," %s 0x%x", message, pktId);
71          return buff;          return buff;
72      }      }
# Line 74  namespace pamela { Line 74  namespace pamela {
74    
75    class WrongCRCException: public Exception {    class WrongCRCException: public Exception {
76    public:    public:
77      WrongCRCException::WrongCRCException(const char* msg):  Exception(msg) {}      WrongCRCException(const char* msg):  Exception(msg) {}
78      WrongCRCException::~WrongCRCException () throw(){ }      ~WrongCRCException () throw(){ }
79    };    };
80    
81    class WrongCRCHeaderException: public Exception {    class WrongCRCHeaderException: public Exception {
82    public:    public:
83      WrongCRCHeaderException::WrongCRCHeaderException(const char* msg):  Exception(msg) {}      WrongCRCHeaderException(const char* msg):  Exception(msg) {}
84      WrongCRCHeaderException::~WrongCRCHeaderException () throw(){ }      ~WrongCRCHeaderException () throw(){ }
85    };    };
86    
87    
88    class LengthException: public Exception {    class LengthException: public Exception {
89    public:    public:
90      LengthException::LengthException(const char* msg):  Exception(msg) { }      LengthException(const char* msg):  Exception(msg) { }
91      LengthException::~LengthException () throw(){ }      ~LengthException () throw(){ }
92    };    };
93    
94    
95    class NotExistingAlgorithmException: public Exception {    class NotExistingAlgorithmException: public Exception {
96    public:    public:
97      NotExistingAlgorithmException::NotExistingAlgorithmException(const char *msg):  Exception(msg) { }      NotExistingAlgorithmException(const char *msg):  Exception(msg) { }
98      NotExistingAlgorithmException::~NotExistingAlgorithmException () throw(){ }      ~NotExistingAlgorithmException () throw(){ }
99    };    };
100        
101    class NotExistingCounterException: public Exception {    class NotExistingCounterException: public Exception {
102    public:    public:
103      NotExistingCounterException::NotExistingCounterException(const char *msg):  Exception(msg) { }      NotExistingCounterException(const char *msg):  Exception(msg) { }
104      NotExistingCounterException::~NotExistingCounterException () throw(){ }      ~NotExistingCounterException () throw(){ }
105    };    };
106    
107    class BackwardCounterException: public Exception {    class BackwardCounterException: public Exception {
108    public:    public:
109      BackwardCounterException::BackwardCounterException(const char *msg):  Exception(msg) { }      BackwardCounterException(const char *msg):  Exception(msg) { }
110      BackwardCounterException::~BackwardCounterException () throw(){ }      ~BackwardCounterException () throw(){ }
111    };    };
112  }  }
113  #endif /* EXCEPTION_H */  #endif /* EXCEPTION_H */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23