00001
00045 #ifndef QSPARQLERROR_H
00046 #define QSPARQLERROR_H
00047
00048 #include <QtSparql/qsparql.h>
00049
00050 #include <QtCore/qstring.h>
00051
00052 QT_BEGIN_HEADER
00053
00054 QT_BEGIN_NAMESPACE
00055
00056 QT_MODULE(Sparql)
00057
00058
00059
00060
00061
00062 class QString;
00063
00064 class Q_SPARQL_EXPORT QSparqlError
00065 {
00066 public:
00067 enum ErrorType {
00068 NoError,
00069 ConnectionError,
00070 StatementError,
00071 TransactionError,
00072 BackendError,
00073 UnknownError
00074 };
00075 QSparqlError(const QString& message = QString(),
00076 ErrorType type = NoError,
00077 int number = -1);
00078 QSparqlError(const QSparqlError& other);
00079 QSparqlError& operator=(const QSparqlError& other);
00080 ~QSparqlError();
00081
00082 QString message() const;
00083 void setMessage(const QString& message);
00084 ErrorType type() const;
00085 void setType(ErrorType type);
00086 int number() const;
00087 void setNumber(int number);
00088 bool isValid() const;
00089
00090 private:
00091 QString errorMessage;
00092 ErrorType errorType;
00093 int errorNumber;
00094 };
00095
00096 #ifndef QT_NO_DEBUG_STREAM
00097 Q_SPARQL_EXPORT QDebug operator<<(QDebug, const QSparqlError &);
00098 #endif
00099
00100 QT_END_NAMESPACE
00101
00102 QT_END_HEADER
00103
00104 #endif // QSPARQLERROR_H