QtSparql
0.2.6
src
sparql
kernel
qsparqlerror.h
1
/***************************************************************************/
45
#ifndef QSPARQLERROR_H
46
#define QSPARQLERROR_H
47
48
#include <qsparql.h>
49
50
#include <QtCore/qstring.h>
51
52
QT_BEGIN_HEADER
53
54
QT_BEGIN_NAMESPACE
55
56
QT_MODULE(Sparql)
57
58
// TODO: how to differentiate between fatal and non-fatal errors. (Fatal =
59
// doesn't make sense to try to exec() anything ever, non-fatal: exec:in the
60
// next query, or the same query again, makes sense.)
61
62
class
QString;
63
64
class
Q_SPARQL_EXPORT
QSparqlError
65
{
66
public
:
67
enum
ErrorType
{
68
NoError
,
69
ConnectionError
,
70
StatementError
,
// = syntax error
71
TransactionError
,
72
BackendError
,
// other error sent by the backend
73
UnknownError
74
};
75
QSparqlError
(
const
QString& message = QString(),
76
ErrorType type = NoError,
77
int
number = -1);
78
QSparqlError
(
const
QSparqlError
& other);
79
QSparqlError
& operator=(
const
QSparqlError
& other);
80
~
QSparqlError
();
81
82
QString message()
const
;
83
void
setMessage(
const
QString& message);
84
ErrorType type()
const
;
85
void
setType(ErrorType type);
86
int
number()
const
;
87
void
setNumber(
int
number);
88
bool
isValid()
const
;
89
90
private
:
91
QString errorMessage;
92
ErrorType errorType;
93
int
errorNumber;
94
};
95
96
#ifndef QT_NO_DEBUG_STREAM
97
Q_SPARQL_EXPORT QDebug operator<<(QDebug,
const
QSparqlError
&);
98
#endif
99
100
QT_END_NAMESPACE
101
102
QT_END_HEADER
103
104
#endif // QSPARQLERROR_H
QSparqlError::TransactionError
@ TransactionError
Definition:
qsparqlerror.h:71
QSparqlError::NoError
@ NoError
Definition:
qsparqlerror.h:68
QSparqlError
The QSparqlError class provides SPARQL error information.
Definition:
qsparqlerror.h:65
QSparqlError::ErrorType
ErrorType
Definition:
qsparqlerror.h:67
QSparqlError::StatementError
@ StatementError
Definition:
qsparqlerror.h:70
QSparqlError::BackendError
@ BackendError
Definition:
qsparqlerror.h:72
QSparqlError::ConnectionError
@ ConnectionError
Definition:
qsparqlerror.h:69
Generated on Thu Mar 7 2013 00:00:00 for QtSparql by
1.8.20