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 4.0 2005/03/06 04:33:01 kusanagi Exp $ |
4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
5 |
* |
* |
6 |
* Header file for the exceptions of Pamela. |
* Header file for the exceptions of 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; |
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 |
|
|
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 |
} |
} |