| RDB 2

Public Types | Public Member Functions | List of all members
riegl::rdb::Error Class Reference

Database error class. More...

`#include <error.hpp>`

Inheritance diagram for riegl::rdb::Error:

## Public Types
enum | ErrorCode { DatabaseOpenFailed = 10100, DatabaseNotOpened = 10101, DatabaseNotWritable = 10102, DatabaseVersionNotSupported = 10103, DatabaseSchemaValidationFailed = 10104, TransactionMissing = 10201, TransactionPending = 10202, TransactionCorrupted = 10203, TransactionInvalid = 10204, TransactionLockAcquireFailed = 10205, TransactionLockReleaseFailed = 10206, TransactionDetailsTooLarge = 10207, PointAttributeDuplicate = 10301, PointAttributeMissing = 10302, PointAttributeInvalidLength = 10303, PointAttributeInvalidLimits = 10304, PointAttributeInvalidDefault = 10305, PointAttributeInvalidResolution = 10306, PointAttributeCannotDuplicate = 10307, PointAttributeCannotModify = 10308, PointAttributeInvalidScale = 10309, PointAttributeNotMergeable = 10310, PointAttributeInvalidInvalid = 10311, MetadataValidationFailed = 10312, MetadataInvalidName = 10313, MetadataTableTooLarge = 10314, MetadataSignatureError = 10315, QueryBindAttributeInvalid = 10401, QueryBindAttributeUnknown = 10402, QueryBindAttributeIndexVoid = 10403, QueryBindAttributeBufferVoid = 10404, QuerySelectFilterParseFailed = 10406, QuerySelectAttributeUnknown = 10407, QuerySelectVectorIndexMissing = 10408, QuerySelectVectorIndexInvalid = 10409, QuerySelectGraphNodeInvalid = 10410, QueryInsertNoPrimaryAttribute = 10411, QueryUpdateConstantAttribute = 10412, QueryStatIndexNodeNotFound = 10413, QueryAttributeValueOutOfRange = 10414, QueryPointIdentifierMissing = 10415, QueryPending = 10416, QueryBindAttributeIncomplete = 10417, QueryInsertTooManyPoints = 10418, QueryInsertFailed = 10419, FeatureNotLicensed = 10001, FailedToParseJSON = 10002, InvalidStringSize = 10003, Internal = 90000, Unknown = 1 }
| List of error codes. More...

## Public Member Functions
| Error (const int &code, const std::string &details="")
| Constructor. More...
virtual | ~Error ()
| Destructor. More...
virtual const int & | code () const RDB_NO_EXCEPT
| Get error code. More...
virtual const char * | what () const RDB_NO_EXCEPT
| Get error text. More...
virtual const char * | details () const RDB_NO_EXCEPT
| Get error details. More...

## Detailed Description

Database error class.

Examples:
  rdb-example-01-create-database.cpp, rdb-example-02-insert-points.cpp, rdb-example-03-select-points.cpp, rdb-example-04-update-points.cpp, rdb-example-05-remove-points.cpp, rdb-example-06-database-stat.cpp, rdb-example-07-fill-points.cpp, rdb-example-08-invert-points.cpp, rdb-example-09-cleanup-database.cpp, and rdb-example-10-attribute-groups.cpp.

Definition at line 62 of file error.hpp.

## Member Enumeration Documentation

## ◆ ErrorCode

enum riegl::rdb::Error::ErrorCode

List of error codes.

Enumerator
DatabaseOpenFailed | failed to create or open database, most likely insufficient access rights or invalid location
DatabaseNotOpened | a query failed because no database was opened
DatabaseNotWritable | modification of database not possible as opened in read-only mode (check file access rights)
DatabaseVersionNotSupported | database file format version not supported
DatabaseSchemaValidationFailed | database does not correspond to user-supplied schema
TransactionMissing | operation failed because there was no transaction, see pointcloud::Transactions::begin()
TransactionPending | operation failed because a transaction is started but not yet finished
TransactionCorrupted | operation failed because database was modified by concurrent client (should never happen)
TransactionInvalid | given transaction ID is invalid
TransactionLockAcquireFailed | failed to acquire database transaction lock
TransactionLockReleaseFailed | failed to release database transaction lock
TransactionDetailsTooLarge | total size of all transaction details strings exceeds the limit
PointAttributeDuplicate | point attribute of given name already exists
PointAttributeMissing | point attribute of given name does not exist, attribute name is stored in error details
PointAttributeInvalidLength | point attribute vector length is invalid
PointAttributeInvalidLimits | point attribute minimum and maximum are invalid
PointAttributeInvalidDefault | point attribute default value out of range (min./max.)
PointAttributeInvalidResolution | point attribute resolution is invalid
PointAttributeCannotDuplicate | source point attribute data could not be copied to target point attribute data as they are not compatible
PointAttributeCannotModify | modification of point attribute property not allowed (property name is stored in error details)
PointAttributeInvalidScale | invalid point attribute scale factor given (value is stored in error details)
PointAttributeNotMergeable | the point attribute details can not be merged because they are not compatible (reason see details) See also riegl::rdb::pointcloud::PointAttributes::getMerged()
PointAttributeInvalidInvalid | point attribute invalid value out of range (min./max.)
MetadataValidationFailed | metadata entry does not correspond to schema
MetadataInvalidName | metadata entry name is not allowed (name is stored in error details)
MetadataTableTooLarge | total size of all metadata item names and values exceeds the limit
MetadataSignatureError | failed to create or verify metadata entry signature (reason in error details)
QueryBindAttributeInvalid | bound invalid attribute to query, attribute name is stored in error details (not all attributes are allowed in all queries)
QueryBindAttributeUnknown | bound unknown attribute to query, attribute name is stored in error details
QueryBindAttributeIndexVoid | bound attribute with invalid vector index
QueryBindAttributeBufferVoid | bound attribute buffer is invalid
QuerySelectFilterParseFailed | select query filter string parsing failed, check syntax
QuerySelectAttributeUnknown | select query filter string refers to unknown point attribute, attribute name is stored in error details
QuerySelectVectorIndexMissing | select query filter string does not define vector index for vector point attribute
QuerySelectVectorIndexInvalid | select query filter string contains invalid vector attribute index
QuerySelectGraphNodeInvalid | select query node ID invalid
QueryInsertNoPrimaryAttribute | no buffer for primary point attribute defined
QueryUpdateConstantAttribute | tried to modify a constant attribute
QueryStatIndexNodeNotFound | index graph node not found (invalid node ID)
QueryAttributeValueOutOfRange | given attribute value (insert or update) is out of range, attribute name is stored in error details
QueryPointIdentifierMissing | no buffer for point ID attribute defined
QueryPending | can't start a new query as an other query started by this Pointcloud instance is not finished yet
QueryBindAttributeIncomplete | no buffer given for at least one element of an vector point attribute (i.e. when length > 1)
QueryInsertTooManyPoints | points can not be inserted as the total number of points would exceed the limit of 65536 * points-per-chunk (defined at database creation); this limit only applies if the primary point attribute is "riegl.id" (point ID)
QueryInsertFailed | point insertion query failed, check the error details for the reason
FeatureNotLicensed | no valid license key found for requested feature
FailedToParseJSON | failed to parse JSON string, reason available in error details
InvalidStringSize | invalid string size, string name and limit in error details
Internal | base error code for fatal internal errors
Unknown | unknown error occurred

Definition at line 68 of file error.hpp.

## Constructor & Destructor Documentation

## ◆ Error()

riegl::rdb::Error::Error | ( | const int & | code,
|  | const std::string & | details = `""`
| ) |  |
| explicit

Constructor.

Parameters

  code | error code

See also
  enum ErrorCode

Parameters

  details | optional error details (e.g. attribute name)

## ◆ ~Error()

virtual riegl::rdb::Error::~Error | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ code()

virtual const int& riegl::rdb::Error::code | ( |  | ) | const
| virtual

Get error code.

See also
  enum ErrorCode

## ◆ details()

virtual const char* riegl::rdb::Error::details | ( |  | ) | const
| virtual

Get error details.

Depending on the error code, there might be additional error details. For example, error QueryAttributeValueOutOfRange stores the attribute name in the error details.

To see which errors provide details,

See also
  enum ErrorCode.

Examples:
  rdb-example-01-create-database.cpp, rdb-example-02-insert-points.cpp, rdb-example-03-select-points.cpp, rdb-example-04-update-points.cpp, rdb-example-05-remove-points.cpp, rdb-example-06-database-stat.cpp, rdb-example-07-fill-points.cpp, rdb-example-08-invert-points.cpp, rdb-example-09-cleanup-database.cpp, and rdb-example-10-attribute-groups.cpp.

## ◆ what()

virtual const char* riegl::rdb::Error::what | ( |  | ) | const
| virtual

Get error text.

This function returns a basic English description text for the error. The client application might use this in e.g. error logs. Text that is displayed to the user should rather be derived from the error code instead (e.g. localized error messages).

Examples:
  rdb-example-01-create-database.cpp, rdb-example-02-insert-points.cpp, rdb-example-03-select-points.cpp, rdb-example-04-update-points.cpp, rdb-example-05-remove-points.cpp, rdb-example-06-database-stat.cpp, rdb-example-07-fill-points.cpp, rdb-example-08-invert-points.cpp, rdb-example-09-cleanup-database.cpp, and rdb-example-10-attribute-groups.cpp.

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

- riegl/rdb/error.hpp