00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
#ifndef UniquenessViolationException_CLASS
00028
#define UniquenessViolationException_CLASS
00029
00030
#include <string>
00031
using std::string;
00032
00033
namespace asdm {
00040 class UniquenessViolationException {
00041
00042
public:
00043
00047
UniquenessViolationException();
00048
00057
UniquenessViolationException(string t);
00058
00059
00060
virtual ~
UniquenessViolationException();
00061
00062 string getMessage()
const;
00063
00064
protected:
00065
00066 string message;
00067
00068 };
00069
00070 inline UniquenessViolationException::UniquenessViolationException(): message(
"Uniqueness violation exception") {;}
00071 inline UniquenessViolationException::UniquenessViolationException (string t) :
00072 message(
"The uniqueness constraint on all attributes except the autoincrementable one is violated in table "+t) {
00073 }
00074
00075
inline UniquenessViolationException::~UniquenessViolationException() {;}
00076
inline string UniquenessViolationException::getMessage()
const {
00077
return message;
00078 }
00079
00080 }
00081
00082
#endif