rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
r_Error Class Reference

The class allows the specification of an error number. More...

#include <error.hh>

Inheritance diagram for r_Error:
r_Ebase_dbms r_Ecapability_refused r_Edim_mismatch r_EGeneral r_Eindex_violation r_Einit_overflow r_Einvalid_interval_bounds r_Elimits_mismatch r_Ememory_allocation r_Eno_permission r_Equery_execution_failed

Public Types

enum  kind {
  r_EGeneral, r_Error_General, r_Error_DatabaseClassMismatch, r_Error_DatabaseClassUndefined,
  r_Error_DatabaseClosed, r_Error_DatabaseOpen, r_Error_DateInvalid, r_Error_IteratorExhausted,
  r_Error_NameNotUnique, r_Error_QueryParameterCountInvalid, r_Error_QueryParameterTypeInvalid, r_Error_RefInvalid,
  r_Error_RefNull, r_Error_TimeInvalid, r_Error_TimestampInvalid, r_Error_TransactionOpen,
  r_Error_TransactionNotOpen, r_Error_TypeInvalid, r_Error_FileNotFound, r_Error_OIdInvalid,
  r_Error_OIdNotUnique, r_Error_DatabaseUnknown, r_Error_TransferFailed, r_Error_HostInvalid,
  r_Error_ServerInvalid, r_Error_RpcInterfaceIncompatible, r_Error_ClientUnknown, r_Error_ObjectUnknown,
  r_Error_ObjectInvalid, r_Error_QueryExecutionFailed, r_Error_BaseDBMSFailed, r_Error_CollectionElementTypeMismatch,
  r_Error_CreatingOIdFailed, r_Error_TransactionReadOnly, r_Error_LimitsMismatch, r_Error_NameInvalid,
  r_Error_FeatureNotSupported, r_Error_SerialisableException, r_Error_AccesDenied, r_Error_SystemOverloaded,
  r_Error_MemoryAllocation, r_Error_InvalidOptimizationLevel, r_Error_InvalidBoundsStringContents, r_Error_RuntimeProjectionError,
  r_Error_InvalidSourceCRS, r_Error_InvalidTargetCRS, r_Error_InvalidProjectionResultGridExtents, r_Error_FileTileStructureInconsistent,
  r_Error_RasFedMessageParsingFailed, r_Error_UDFInstallationDirectoryNotDefined, r_Error_TileCannotBeLocked, r_Error_Conversion,
  r_Error_RasfedConnectionFailed, r_Error_RasfedConnectionTimeout, r_Error_RasfedUnknownPeerHostname
}
 error kinds More...
 

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...
 

Detailed Description

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.

Member Enumeration Documentation

◆ kind

error kinds

Enumerator
r_EGeneral 
r_Error_General 
r_Error_DatabaseClassMismatch 
r_Error_DatabaseClassUndefined 
r_Error_DatabaseClosed 
r_Error_DatabaseOpen 
r_Error_DateInvalid 
r_Error_IteratorExhausted 
r_Error_NameNotUnique 
r_Error_QueryParameterCountInvalid 
r_Error_QueryParameterTypeInvalid 
r_Error_RefInvalid 
r_Error_RefNull 
r_Error_TimeInvalid 
r_Error_TimestampInvalid 
r_Error_TransactionOpen 
r_Error_TransactionNotOpen 
r_Error_TypeInvalid 
r_Error_FileNotFound 
r_Error_OIdInvalid 
r_Error_OIdNotUnique 
r_Error_DatabaseUnknown 
r_Error_TransferFailed 
r_Error_HostInvalid 
r_Error_ServerInvalid 
r_Error_RpcInterfaceIncompatible 
r_Error_ClientUnknown 
r_Error_ObjectUnknown 
r_Error_ObjectInvalid 
r_Error_QueryExecutionFailed 
r_Error_BaseDBMSFailed 
r_Error_CollectionElementTypeMismatch 
r_Error_CreatingOIdFailed 
r_Error_TransactionReadOnly 
r_Error_LimitsMismatch 
r_Error_NameInvalid 
r_Error_FeatureNotSupported 
r_Error_SerialisableException 
r_Error_AccesDenied 
r_Error_SystemOverloaded 
r_Error_MemoryAllocation 
r_Error_InvalidOptimizationLevel 
r_Error_InvalidBoundsStringContents 
r_Error_RuntimeProjectionError 
r_Error_InvalidSourceCRS 
r_Error_InvalidTargetCRS 
r_Error_InvalidProjectionResultGridExtents 
r_Error_FileTileStructureInconsistent 
r_Error_RasFedMessageParsingFailed 
r_Error_UDFInstallationDirectoryNotDefined 
r_Error_TileCannotBeLocked 
r_Error_Conversion 
r_Error_RasfedConnectionFailed 
r_Error_RasfedConnectionTimeout 
r_Error_RasfedUnknownPeerHostname 

Constructor & Destructor Documentation

◆ r_Error() [1/6]

r_Error::r_Error ( )

◆ r_Error() [2/6]

r_Error::r_Error ( kind  theKindArg,
unsigned int  newErrorNo = 0 
)
explicit

constructor getting the kind

◆ r_Error() [3/6]

r_Error::r_Error ( kind  theKindArg,
std::string  errorParam 
)
explicit

constructor getting the kind and additional error details

◆ r_Error() [4/6]

r_Error::r_Error ( unsigned int  errorno)
explicit

constructor getting an error number

◆ r_Error() [5/6]

r_Error::r_Error ( unsigned int  errorno,
std::string  errorDetails 
)
explicit

constructor getting an error number and additional error details

◆ r_Error() [6/6]

r_Error::r_Error ( const char *  what)

constructor getting an error text

◆ ~r_Error()

r_Error::~r_Error ( )
overridedefaultnoexcept

Member Function Documentation

◆ get_errorno()

unsigned long r_Error::get_errorno ( ) const

◆ get_errorparam()

const std::string& r_Error::get_errorparam ( ) const

◆ get_kind()

kind r_Error::get_kind ( ) const

◆ initTextTable()

static void r_Error::initTextTable ( )
static

read error text file into text table

◆ resetErrorText()

virtual void r_Error::resetErrorText ( )
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.

◆ serialiseError()

virtual std::string r_Error::serialiseError ( ) const
virtual

used to transfer exceptions of kind r_Error_SerialisableException to the client.

◆ set_what()

void r_Error::set_what ( const char *  what)

◆ setErrorTextOnKind()

void r_Error::setErrorTextOnKind ( )
protected

set error text according to the actual error kind

◆ setErrorTextOnNumber()

void r_Error::setErrorTextOnNumber ( )
protected

set error text according to the actual error number

◆ setTextParameter() [1/2]

void r_Error::setTextParameter ( const char *  parameterName,
const char *  value 
)

replace the specified parameter by the string value

◆ setTextParameter() [2/2]

void r_Error::setTextParameter ( const char *  parameterName,
long long  value 
)

replace the specified parameter by the integer value

◆ updateWithErrorDetails()

void r_Error::updateWithErrorDetails ( )
protected

Update the standard error text with the extra error information if any was specified.

◆ what()

const char* r_Error::what ( ) const
overridenoexcept

◆ what_str()

virtual const std::string& r_Error::what_str ( ) const
virtualnoexcept

Member Data Documentation

◆ errorDetails

std::string r_Error::errorDetails
protected

additional information for errors that can be parameterized

◆ errorNo

unsigned int r_Error::errorNo {0u}
protected

attribute storing the number of the error

◆ errorText

std::string r_Error::errorText
protected

attribute storing the error description text

◆ theKind

kind r_Error::theKind {r_Error_General}
protected

attribute storing the error kind


The documentation for this class was generated from the following file: