• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

soprano

Soprano::Error::ErrorCache

Soprano::Error::ErrorCache Class Reference

#include <Soprano/Error/ErrorCache>

Inheritance diagram for Soprano::Error::ErrorCache:

Inheritance graph
[legend]

List of all members.


Detailed Description

Core class of Soprano's exception system.

The ErrorCache caches Error instances for different threads. Each thread has its own last error. This mechanism tries to replace the missing exceptions for methods that do not return an error code or another value that can state the success of the method's operation.

Author:
Sebastian Trueg <trueg@kde.org>
See also:
Error handling in Soprano

Definition at line 233 of file error.h.


Public Member Functions

virtual Error lastError () const
virtual ~ErrorCache ()

Protected Member Functions

void clearError () const
 ErrorCache ()
void setError (const QString &errorMessage, int code=ErrorUnknown) const
void setError (const Error &) const

Constructor & Destructor Documentation

virtual Soprano::Error::ErrorCache::~ErrorCache (  )  [virtual]

Soprano::Error::ErrorCache::ErrorCache (  )  [protected]


Member Function Documentation

void Soprano::Error::ErrorCache::clearError (  )  const [protected]

Reset the error for the current thread to no error.

virtual Error Soprano::Error::ErrorCache::lastError (  )  const [virtual]

Get the last error that occured in the current thread.

void Soprano::Error::ErrorCache::setError ( const QString &  errorMessage,
int  code = ErrorUnknown 
) const [protected]

Convenience method to set simple string error messages with a default error code ErrorUnknown.

void Soprano::Error::ErrorCache::setError ( const Error &   )  const [protected]

Set the last occured error.

This method is const to allow setting of errors in all types of methods. The last error is as such a mutable property.


The documentation for this class was generated from the following file:
  • error.h

soprano

Skip menu "soprano"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • akonadi
  • Decibel
  • eigen
  • Eigen2
  • kdewin32
  • Phonon
  •     Backend
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal