![]() |
rasdaman client API
10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
|
The class allows the specification of an error number. More...
#include <error.hh>
Public Member Functions | |
| r_Error () | |
| r_Error (kind theKindArg, unsigned int newErrorNo=0) | |
| constructor getting the kind More... | |
| r_Error (kind theKindArg, std::string errorParam) | |
| constructor getting the kind and additional error details More... | |
| r_Error (unsigned int errorno) | |
| constructor getting an error number More... | |
| r_Error (unsigned int errorno, std::string errorDetails) | |
| constructor getting an error number and additional error details More... | |
| r_Error (const char *what) | |
| constructor getting an error text More... | |
| ~r_Error () noexcept override=default | |
| const char * | what () const noexcept override |
| virtual const std::string & | what_str () const noexcept |
| kind | get_kind () const |
| unsigned long | get_errorno () const |
| const std::string & | get_errorparam () const |
| void | set_what (const char *what) |
| virtual std::string | serialiseError () const |
| used to transfer exceptions of kind r_Error_SerialisableException to the client. More... | |
| void | setTextParameter (const char *parameterName, long long value) |
| replace the specified parameter by the integer value More... | |
| void | setTextParameter (const char *parameterName, const char *value) |
| replace the specified parameter by the string value More... | |
Static Public Member Functions | |
| static void | initTextTable () |
| read error text file into text table More... | |
Protected Member Functions | |
| void | setErrorTextOnKind () |
| set error text according to the actual error kind More... | |
| void | setErrorTextOnNumber () |
| set error text according to the actual error number More... | |
| virtual void | resetErrorText () |
| The virtual method is redefined in each subclass which supports text parameters. More... | |
| void | updateWithErrorDetails () |
| Update the standard error text with the extra error information if any was specified. More... | |
Protected Attributes | |
| std::string | errorText |
| attribute storing the error description text More... | |
| unsigned int | errorNo {0u} |
| attribute storing the number of the error More... | |
| kind | theKind {r_Error_General} |
| attribute storing the error kind More... | |
| std::string | errorDetails |
| additional information for errors that can be parameterized More... | |
The class allows the specification of an error number.
The error number is used as an index to a generic textual description of the error which is read by setErrorTextOnNumber(). Error text is loaded from a text file by the friend method initTextTable() which has to be invoked at the beginning of the application. The table can be freed again using freeTextTable(). The parameters in the generic text are substituted using setTextParameter().
If no error number is specified, the error kind is used as error text.
Attention: The content of an error object is not supposed to be changed after creation because the error text is initialized only in the constructor. Therefore, just read methods for error parameters are supported.
A standard error text file is read by initTextTable(). The location and file name expected is defined here. Ideally all programs using this mechanism should include error.hh to use the same settings.
| enum r_Error::kind |
error kinds
| r_Error::r_Error | ( | ) |
|
explicit |
constructor getting the kind
|
explicit |
constructor getting the kind and additional error details
|
explicit |
constructor getting an error number
|
explicit |
constructor getting an error number and additional error details
| r_Error::r_Error | ( | const char * | what | ) |
constructor getting an error text
|
overridedefaultnoexcept |
| unsigned long r_Error::get_errorno | ( | ) | const |
| const std::string& r_Error::get_errorparam | ( | ) | const |
| kind r_Error::get_kind | ( | ) | const |
|
static |
read error text file into text table
|
protectedvirtual |
The virtual method is redefined in each subclass which supports text parameters.
Usually it is invoked in the constructor of the subclass.
Reimplemented in r_Ebase_dbms, r_Einvalid_interval_bounds, r_Elimits_mismatch, r_Equery_execution_failed, r_Edim_mismatch, and r_Eindex_violation.
|
virtual |
used to transfer exceptions of kind r_Error_SerialisableException to the client.
| void r_Error::set_what | ( | const char * | what | ) |
|
protected |
set error text according to the actual error kind
|
protected |
set error text according to the actual error number
| void r_Error::setTextParameter | ( | const char * | parameterName, |
| const char * | value | ||
| ) |
replace the specified parameter by the string value
| void r_Error::setTextParameter | ( | const char * | parameterName, |
| long long | value | ||
| ) |
replace the specified parameter by the integer value
|
protected |
Update the standard error text with the extra error information if any was specified.
|
overridenoexcept |
|
virtualnoexcept |
|
protected |
additional information for errors that can be parameterized
|
protected |
attribute storing the number of the error
|
protected |
attribute storing the error description text
|
protected |
attribute storing the error kind