--- chewbacca/event/Exception.h 2008/09/23 07:19:52 1.1.1.1 +++ chewbacca/event/Exception.h 2009/08/04 13:58:17 1.2 @@ -1,7 +1,7 @@ /** @file - * $Source: /repository/event/Exception.h,v $ - * $Id: Exception.h,v 1.3 2008-03-04 18:07:25 messineo Exp $ - * $Author: messineo $ + * $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/event/Exception.h,v $ + * $Id: Exception.h,v 1.1.1.1 2008/09/23 07:19:52 mocchiut Exp $ + * $Author: mocchiut $ * * Header file for the exceptions of Pamela. */ @@ -33,40 +33,40 @@ //marco: class CalibException: public Exception { public: - CalibException::CalibException(const char* msg): Exception(msg) {} - CalibException::~CalibException () throw(){ } + CalibException(const char* msg): Exception(msg) {} + ~CalibException () throw(){ } }; //marco: class WrongCRCException_PKTUsed: public Exception { public: - WrongCRCException_PKTUsed::WrongCRCException_PKTUsed(const char* msg): Exception(msg) {} - WrongCRCException_PKTUsed::~WrongCRCException_PKTUsed () throw(){ } + WrongCRCException_PKTUsed(const char* msg): Exception(msg) {} + ~WrongCRCException_PKTUsed () throw(){ } }; //marco: class FatalException: public Exception { public: - FatalException::FatalException(const char* msg): Exception(msg) {} - FatalException::~FatalException () throw(){ } + FatalException(const char* msg): Exception(msg) {} + ~FatalException () throw(){ } }; class NotFoundEnvironmentVarException: public Exception { public: - NotFoundEnvironmentVarException::NotFoundEnvironmentVarException(const char* msg): Exception(msg) {} - NotFoundEnvironmentVarException::~NotFoundEnvironmentVarException () throw(){ } + NotFoundEnvironmentVarException(const char* msg): Exception(msg) {} + ~NotFoundEnvironmentVarException () throw(){ } }; class UnidentifiedPacketException: public Exception { private: UINT8 pktId; public: - UnidentifiedPacketException::UnidentifiedPacketException(UINT8 id): + UnidentifiedPacketException(UINT8 id): Exception("Unidentified PacketType - Id: ") { pktId = id; } - UnidentifiedPacketException::~UnidentifiedPacketException () throw(){ } - const char* UnidentifiedPacketException::print () const throw () { + ~UnidentifiedPacketException () throw(){ } + const char* print () const throw () { sprintf((char*)buff," %s 0x%x", message, pktId); return buff; } @@ -74,40 +74,40 @@ class WrongCRCException: public Exception { public: - WrongCRCException::WrongCRCException(const char* msg): Exception(msg) {} - WrongCRCException::~WrongCRCException () throw(){ } + WrongCRCException(const char* msg): Exception(msg) {} + ~WrongCRCException () throw(){ } }; class WrongCRCHeaderException: public Exception { public: - WrongCRCHeaderException::WrongCRCHeaderException(const char* msg): Exception(msg) {} - WrongCRCHeaderException::~WrongCRCHeaderException () throw(){ } + WrongCRCHeaderException(const char* msg): Exception(msg) {} + ~WrongCRCHeaderException () throw(){ } }; class LengthException: public Exception { public: - LengthException::LengthException(const char* msg): Exception(msg) { } - LengthException::~LengthException () throw(){ } + LengthException(const char* msg): Exception(msg) { } + ~LengthException () throw(){ } }; class NotExistingAlgorithmException: public Exception { public: - NotExistingAlgorithmException::NotExistingAlgorithmException(const char *msg): Exception(msg) { } - NotExistingAlgorithmException::~NotExistingAlgorithmException () throw(){ } + NotExistingAlgorithmException(const char *msg): Exception(msg) { } + ~NotExistingAlgorithmException () throw(){ } }; class NotExistingCounterException: public Exception { public: - NotExistingCounterException::NotExistingCounterException(const char *msg): Exception(msg) { } - NotExistingCounterException::~NotExistingCounterException () throw(){ } + NotExistingCounterException(const char *msg): Exception(msg) { } + ~NotExistingCounterException () throw(){ } }; class BackwardCounterException: public Exception { public: - BackwardCounterException::BackwardCounterException(const char *msg): Exception(msg) { } - BackwardCounterException::~BackwardCounterException () throw(){ } + BackwardCounterException(const char *msg): Exception(msg) { } + ~BackwardCounterException () throw(){ } }; } #endif /* EXCEPTION_H */