MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QSparqlError Class Reference

The QSparqlError class provides SPARQL error information. More...

List of all members.

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

Detailed Description

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.

See also:
QSparqlConnection::lastError(), QSparqlResult::lastError()

Member Enumeration Documentation

This enum type describes the context in which the error occurred.

Enumerator:
NoError 

No error occurred.

ConnectionError 

Connection error.

StatementError 

SPARQL statement syntax error.

TransactionError 

Transaction failed error.

BackendError 

Other backend-specific error

UnknownError 

Unknown error.


Constructor & Destructor Documentation

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.


Member Function Documentation

bool QSparqlError::isValid (  )  const

Returns true if an error is set, otherwise false.

See also:
type()
QString QSparqlError::message (  )  const

Returns the error message.

See also:
setMessage()
int QSparqlError::number (  )  const

Returns the connection-specific error number, or -1 if it cannot be determined.

See also:
setNumber()
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.

See also:
message()
void QSparqlError::setNumber ( int  number  ) 

Sets the connection-specific error number to number.

See also:
number()
void QSparqlError::setType ( ErrorType  type  ) 

Sets the error type to the value of type.

See also:
type()
QSparqlError::ErrorType QSparqlError::type (  )  const

Returns the error type, or -1 if the type cannot be determined.

See also:
setType()

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