KDE 4.6 PyKDE API Reference

- KDE's Python API

# ErrorCache Class Reference

`from PyKDE4.soprano import *`

Subclasses: Soprano.Util.AsyncQuery, Soprano.Util.AsyncResult, Soprano.Backend, Soprano.Client.DBusClient, Soprano.Server.DBusExportIterator, Soprano.Client.LocalSocketClient, Soprano.Model, Soprano.Parser, Soprano.Serializer, Soprano.Server.ServerCore, Soprano.Client.TcpClient
Namespace: Soprano.Error

## Detailed Description

\class ErrorCache error.h 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@kde.org>

\sa soprano_error_handling

## Methods

| __init__ (self)
| clearError (self)
Soprano.Error.Error | lastError (self)
| setError (self, Soprano.Error.Error a0)
| setError (self, QString errorMessage, int code=Soprano.Error.ErrorUnknown)

## Method Documentation

__init__ | ( |  | self ) |

clearError | ( |  | self ) |

Reset the error for the current thread to no error.

Soprano.Error.Error lastError | ( |  | self ) |

Get the last error that occured in the current thread.

setError | ( | self, |
|  | Soprano.Error.Error | a0
| ) |  |  |

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

setError | ( | self, |
|  | QString | errorMessage,
|  | int | code=Soprano.Error.ErrorUnknown
| ) |  |  |

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