The QSparqlError class provides SPARQL error information. More...
Public Types |
|
enum | ErrorType { NoError, ConnectionError, StatementError, TransactionError, BackendError, UnknownError } |
Public Member Functions |
|
QSparqlError (const QString &message=QString(), ErrorType type=NoError, int number=-1) | |
QSparqlError (const QSparqlError &other) | |
QSparqlError & | operator= (const QSparqlError &other) |
~QSparqlError () | |
QString | message () const |
void | setMessage (const QString &message) |
ErrorType | type () const |
void | setType (ErrorType type) |
int | number () const |
void | setNumber (int number) |
bool | isValid () const |
The QSparqlError class provides SPARQL error information.
A QSparqlError object can provide driver-specific error data, including the error message(), number() and type(). The functions all have setters so that you can create and return QSparqlError objects from your own classes, for example from your own SPARQL drivers.
QSparqlError::QSparqlError | ( | const QString & | message = QString() , |
|
ErrorType | type = NoError , |
|||
int | number = -1 |
|||
) |
Constructs an error containing the driver error message, the type type and the optional error number number.
QSparqlError::QSparqlError | ( | const QSparqlError & | other | ) |
Creates a copy of other.
QSparqlError::~QSparqlError | ( | ) |
Destroys the object and frees any allocated resources.
bool QSparqlError::isValid | ( | ) | const |
Returns true if an error is set, otherwise false.
QString QSparqlError::message | ( | ) | const |
Returns the error message.
int QSparqlError::number | ( | ) | const |
Returns the connection-specific error number, or -1 if it cannot be determined.
QSparqlError & QSparqlError::operator= | ( | const QSparqlError & | other | ) |
Assigns the other error's values to this error.
void QSparqlError::setMessage | ( | const QString & | message | ) |
Sets the error message to the value of message.
void QSparqlError::setNumber | ( | int | number | ) |
Sets the connection-specific error number to number.
void QSparqlError::setType | ( | ErrorType | type | ) |
Sets the error type to the value of type.
QSparqlError::ErrorType QSparqlError::type | ( | ) | const |
Returns the error type, or -1 if the type cannot be determined.
Copyright (C) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). Commercial Qt/LGPL 2.1 with Nokia exception/GPL 3.0 |
MeeGo 1.2 Harmattan API
|