| 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.1 2004/12/03 22:04:04 kusanagi Exp $ |
| 4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
| 5 |
* |
* |
| 6 |
* Header file for the exceptions of Pamela. |
* Header file for the exceptions of Pamela. |
| 44 |
|
|
| 45 |
class WrongCRCException: public Exception { |
class WrongCRCException: public Exception { |
| 46 |
public: |
public: |
| 47 |
WrongCRCException::WrongCRCException(char* msg): Exception(msg) {} |
WrongCRCException::WrongCRCException(const char* msg): Exception(msg) {} |
| 48 |
WrongCRCException::~WrongCRCException () throw(){ } |
WrongCRCException::~WrongCRCException () throw(){ } |
|
const char* WrongCRCException::print () const throw () { |
|
|
return message; |
|
|
} |
|
| 49 |
}; |
}; |
| 50 |
|
|
| 51 |
class WrongCRCHeaderException: public Exception { |
class WrongCRCHeaderException: public Exception { |
| 52 |
public: |
public: |
| 53 |
WrongCRCHeaderException::WrongCRCHeaderException(): Exception() {} |
WrongCRCHeaderException::WrongCRCHeaderException(const char* msg): Exception(msg) {} |
| 54 |
WrongCRCHeaderException::~WrongCRCHeaderException () throw(){ } |
WrongCRCHeaderException::~WrongCRCHeaderException () throw(){ } |
|
const char* WrongCRCHeaderException::print () const throw () { |
|
|
return "CRC Header Exception"; |
|
|
} |
|
| 55 |
}; |
}; |
| 56 |
|
|
| 57 |
|
|
| 58 |
class LengthException: public Exception { |
class LengthException: public Exception { |
| 59 |
public: |
public: |
| 60 |
LengthException::LengthException(char* msg): Exception(msg) { } |
LengthException::LengthException(const char* msg): Exception(msg) { } |
| 61 |
LengthException::~LengthException () throw(){ } |
LengthException::~LengthException () throw(){ } |
|
const char* LengthException::print () const throw () { |
|
|
return message; |
|
|
} |
|
| 62 |
}; |
}; |
| 63 |
|
|
| 64 |
|
|
| 66 |
public: |
public: |
| 67 |
NotExistingAlgorithmException::NotExistingAlgorithmException(const char *msg): Exception(msg) { } |
NotExistingAlgorithmException::NotExistingAlgorithmException(const char *msg): Exception(msg) { } |
| 68 |
NotExistingAlgorithmException::~NotExistingAlgorithmException () throw(){ } |
NotExistingAlgorithmException::~NotExistingAlgorithmException () throw(){ } |
|
const char* NotExistingAlgorithmException::print () const throw () { |
|
|
return strcat("\n No way to read events of type ", message); |
|
|
} |
|
| 69 |
}; |
}; |
| 70 |
|
|
| 71 |
class NotExistingCounterException: public Exception { |
class NotExistingCounterException: public Exception { |
| 72 |
public: |
public: |
| 73 |
NotExistingCounterException::NotExistingCounterException(const char *msg): Exception(msg) { } |
NotExistingCounterException::NotExistingCounterException(const char *msg): Exception(msg) { } |
| 74 |
NotExistingCounterException::~NotExistingCounterException () throw(){ } |
NotExistingCounterException::~NotExistingCounterException () throw(){ } |
|
const char* NotExistingCounterException::print () const throw () { |
|
|
return strcat("\n No counter of type ", message); |
|
|
} |
|
| 75 |
}; |
}; |
| 76 |
|
|
| 77 |
} |
} |