Class that allows to store errors persistently in a SQLite database.
More...
#include <fw/ErrorService.h>
|
| ErrorService (Authority &authority, const std::string &errorDBFilename) |
|
template<typename Reflector > |
void | reflect (Reflector &r) |
| Reflect method for serialization. More...
|
|
void | setError (const std::string &category, const std::string &authority, const std::string &errorTxt, const std::string &message) |
| Stores an error in a category for the given authority in the database. More...
|
|
void | resetError (const std::string &category, const std::string &authority) |
| Reset errors in a category for the given authority. More...
|
|
void | resetErrors (const std::string &authority) |
| Reset all errors for the given authority. More...
|
|
uint32 | getErrorCount (const std::string &authority) |
| Get number of errors for the given authority. More...
|
|
ErrorVector | getErrors () |
| Get all errors from the database. More...
|
|
std::string | getErrorText (const std::string &error, const std::string &language) |
| Get a translation of an error text for the specified language. More...
|
|
Class that allows to store errors persistently in a SQLite database.
◆ ErrorVector
◆ ErrorService()
◆ reflect()
void reflect |
( |
Reflector & |
r | ) |
|
|
inline |
Reflect method for serialization.
◆ setError()
void setError |
( |
const std::string & |
category, |
|
|
const std::string & |
authority, |
|
|
const std::string & |
errorTxt, |
|
|
const std::string & |
message |
|
) |
| |
Stores an error in a category for the given authority in the database.
If the same error exists in the database
- Parameters
-
[in] | category | Error category |
[in] | authority | The authority that reports the error |
[in] | errorTxt | The error text that is used for translation of errors |
[in] | message | The error message that will not be translated |
◆ resetError()
void resetError |
( |
const std::string & |
category, |
|
|
const std::string & |
authority |
|
) |
| |
Reset errors in a category for the given authority.
- Parameters
-
[in] | category | The category to clear the errors |
[in] | authority | The authority that reported the error |
◆ resetErrors()
void resetErrors |
( |
const std::string & |
authority | ) |
|
Reset all errors for the given authority.
- Parameters
-
[in] | authority | The authority that reported the errors |
◆ getErrorCount()
uint32 getErrorCount |
( |
const std::string & |
authority | ) |
|
Get number of errors for the given authority.
- Parameters
-
[in] | authority | The authority that reported the errors |
◆ getErrors()
Get all errors from the database.
◆ getErrorText()
std::string getErrorText |
( |
const std::string & |
error, |
|
|
const std::string & |
language |
|
) |
| |
Get a translation of an error text for the specified language.
◆ checkDB()
◆ mMutex
◆ mAuthority
◆ mErrorDBFilename
std::string mErrorDBFilename |
|
protected |
◆ mDB
The documentation for this class was generated from the following file: