Core class of Soprano's exception system.
More...
#include <Soprano/Error/ErrorCache>
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.nosp@m.@kde.nosp@m..org
- See also
- Error handling in Soprano
Definition at line 234 of file error.h.
◆ ~ErrorCache()
virtual Soprano::Error::ErrorCache::~ErrorCache |
( |
| ) |
|
|
virtual |
◆ ErrorCache()
Soprano::Error::ErrorCache::ErrorCache |
( |
| ) |
|
|
protected |
◆ lastError()
virtual Error Soprano::Error::ErrorCache::lastError |
( |
| ) |
const |
|
virtual |
Get the last error that occured in the current thread.
◆ clearError()
void Soprano::Error::ErrorCache::clearError |
( |
| ) |
const |
|
protected |
Reset the error for the current thread to no error.
◆ setError() [1/2]
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.
◆ setError() [2/2]
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.
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/soprano-2.9.4/soprano/error.h