C++ edjLibrary SDK
Enumerations | Functions
edjx::error Namespace Reference

Error-handling enums and utilities. More...

Enumerations

enum class  HttpError {
  Success = 0 , SystemError , UnknownError , HeaderInvalidName ,
  HeaderInvalidValue , HeaderTooLargeName , HeaderTooLargeValue , HTTPBodyTooLarge ,
  UriInvalid , UriTooLarge , HTTPInvalidMethod , HTTPInvalidStatusCode ,
  HTTPInvalidVersion
}
 Enum describing return values of functions that correspond to HTTP modules. More...
 
enum class  KVError { Success = 0 , Unknown , NotFound , UnAuthorized }
 Enum describing return values of functions that correspond to kv modules. More...
 
enum class  StorageError {
  Success = 0 , SystemError , EmptyContent , MissingFileName ,
  DeletedBucketID , MissingBucketID , InternalError , ContentNotFound ,
  UnAuthorized , MissingAttributes , ContentDeleted , InvalidAttributes ,
  ResourceLimit
}
 Enum describing return values of functions that correspond to storage modules. More...
 

Functions

std::string to_string (HttpError e)
 Returns a string representation of HttpError. More...
 
std::string to_string (KVError e)
 Returns a string representation of KVError. More...
 
std::string to_string (StorageError e)
 Returns a string representation of StorageError. More...
 
edjx::http::HttpStatusCode to_http_status_code (StorageError e)
 Convert an edjx::error::StorageError into an HTTP status code. More...
 

Detailed Description

Error-handling enums and utilities.

Enumeration Type Documentation

◆ HttpError

enum class edjx::error::HttpError
strong

Enum describing return values of functions that correspond to HTTP modules.

Enumerator
Success 

Operation was successful.

SystemError 

An error occured in the SDK library.

UnknownError 

An unknown error occured while performing the request.

HeaderInvalidName 

Invalid header name.

HeaderInvalidValue 

Invalid header value.

HeaderTooLargeName 

Header name is too long.

HeaderTooLargeValue 

Header value is too long.

HTTPBodyTooLarge 

HTTP body exceeds prescribed limits.

UriInvalid 

Invalid URI.

UriTooLarge 

URI is too long.

HTTPInvalidMethod 

An invalid HTTP method was provided.

HTTPInvalidStatusCode 

An invalid HTTP status code was provided.

HTTPInvalidVersion 

An invalid HTTP version was provided.

◆ KVError

enum class edjx::error::KVError
strong

Enum describing return values of functions that correspond to kv modules.

Enumerator
Success 

KV operation was successful.

Unknown 

An unknown error has ocurred while trying to perform a KV store operation.

NotFound 

The value associated with the key could not be found.

UnAuthorized 

This application is not authorized to access this key.

◆ StorageError

enum class edjx::error::StorageError
strong

Enum describing return values of functions that correspond to storage modules.

Enumerator
Success 

Storage operation was successful.

SystemError 

An error occured in the SDK library.

EmptyContent 

Content is required.

MissingFileName 

File name is required.

DeletedBucketID 

The bucket id is deleted.

MissingBucketID 

Bucket ID is required.

InternalError 

An internal error occured while performing the request.

ContentNotFound 

The content or bucket wasn't found on the store.

UnAuthorized 

The credentials or policies entered are incorrect. Request could not be performed.

MissingAttributes 

Attributes are required.

ContentDeleted 

The required content does not exist or has been deleted.

InvalidAttributes 

The attributes are invalid.

ResourceLimit 

Resource limit exceeded.

Function Documentation

◆ to_http_status_code()

edjx::http::HttpStatusCode edjx::error::to_http_status_code ( StorageError  e)
inline

Convert an edjx::error::StorageError into an HTTP status code.

Parameters
eStorage error value
Returns
HTTP status code corresponding to the storage error value

◆ to_string() [1/3]

std::string edjx::error::to_string ( HttpError  e)
inline

Returns a string representation of HttpError.

Parameters
eError value
Returns
String representation of the error value

◆ to_string() [2/3]

std::string edjx::error::to_string ( KVError  e)
inline

Returns a string representation of KVError.

Parameters
eError value
Returns
String representation of the error value

◆ to_string() [3/3]

std::string edjx::error::to_string ( StorageError  e)
inline

Returns a string representation of StorageError.

Parameters
eError value
Returns
String representation of the error value