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

Diff of /yoda/event/Exception.h

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

revision 2.1 by kusanagi, Fri Dec 3 22:04:04 2004 UTC revision 2.2.2.1 by kusanagi, Fri Mar 4 10:13:53 2005 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvsmanager/yoda/event/Exception.h,v $   * $Source: /home/cvsmanager/yoda/event/Exception.h,v $
3   * $Id: Exception.h,v 2.0 2004/09/21 20:49:57 kusanagi Exp $   * $Id: Exception.h,v 2.3 2005/02/15 17:53:35 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Header file for the exceptions of Pamela.   * Header file for the exceptions of Pamela.
# Line 27  namespace pamela { Line 27  namespace pamela {
27      virtual const char* print () const throw () { return message; }      virtual const char* print () const throw () { return message; }
28    };    };
29    
30      class NotFoundEnvironmentVarException: public Exception {
31      public:
32        NotFoundEnvironmentVarException::NotFoundEnvironmentVarException(const char* msg):  Exception(msg) {}
33        NotFoundEnvironmentVarException::~NotFoundEnvironmentVarException () throw(){ }
34      };
35    
36    class UnidentifiedPacketException: public Exception {    class UnidentifiedPacketException: public Exception {
37    private:    private:
38      UINT8     pktId;      UINT8     pktId;
# Line 44  namespace pamela { Line 50  namespace pamela {
50    
51    class WrongCRCException: public Exception {    class WrongCRCException: public Exception {
52    public:    public:
53      WrongCRCException::WrongCRCException(char* msg):  Exception(msg) {}      WrongCRCException::WrongCRCException(const char* msg):  Exception(msg) {}
54      WrongCRCException::~WrongCRCException () throw(){ }      WrongCRCException::~WrongCRCException () throw(){ }
     const char* WrongCRCException::print () const throw () {  
         return message;  
     }  
55    };    };
56    
57    class WrongCRCHeaderException: public Exception {    class WrongCRCHeaderException: public Exception {
58    public:    public:
59      WrongCRCHeaderException::WrongCRCHeaderException():  Exception() {}      WrongCRCHeaderException::WrongCRCHeaderException(const char* msg):  Exception(msg) {}
60      WrongCRCHeaderException::~WrongCRCHeaderException () throw(){ }      WrongCRCHeaderException::~WrongCRCHeaderException () throw(){ }
     const char* WrongCRCHeaderException::print () const throw () {  
         return "CRC Header Exception";  
     }  
61    };    };
62    
63    
64    class LengthException: public Exception {    class LengthException: public Exception {
65    public:    public:
66      LengthException::LengthException(char* msg):  Exception(msg) { }      LengthException::LengthException(const char* msg):  Exception(msg) { }
67      LengthException::~LengthException () throw(){ }      LengthException::~LengthException () throw(){ }
     const char* LengthException::print () const throw () {  
         return message;  
     }  
68    };    };
69    
70    
# Line 75  namespace pamela { Line 72  namespace pamela {
72    public:    public:
73      NotExistingAlgorithmException::NotExistingAlgorithmException(const char *msg):  Exception(msg) { }      NotExistingAlgorithmException::NotExistingAlgorithmException(const char *msg):  Exception(msg) { }
74      NotExistingAlgorithmException::~NotExistingAlgorithmException () throw(){ }      NotExistingAlgorithmException::~NotExistingAlgorithmException () throw(){ }
   const char* NotExistingAlgorithmException::print () const throw () {  
     return strcat("\n No way to read events of type  ", message);  
   }  
75    };    };
76        
77    class NotExistingCounterException: public Exception {    class NotExistingCounterException: public Exception {
78    public:    public:
79      NotExistingCounterException::NotExistingCounterException(const char *msg):  Exception(msg) { }      NotExistingCounterException::NotExistingCounterException(const char *msg):  Exception(msg) { }
80      NotExistingCounterException::~NotExistingCounterException () throw(){ }      NotExistingCounterException::~NotExistingCounterException () throw(){ }
   const char* NotExistingCounterException::print () const throw () {  
     return strcat("\n No counter of type  ", message);  
     }  
81    };    };
82    
83  }  }

Legend:
Removed from v.2.1  
changed lines
  Added in v.2.2.2.1

  ViewVC Help
Powered by ViewVC 1.1.23