C++ edjLibrary SDK
Loading...
Searching...
No Matches
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 , HTTPFetchResponseNotFound , HTTPFetchRequestFailed , HTTPChannelClosed
}
 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 , StorageResponseNotFound , StorageChannelClosed
}
 Enum describing return values of functions that correspond to storage modules. More...
 
enum class  StreamError {
  Success = 0 , EndOfStream , Unknown , SystemError ,
  StreamNotFound , StreamChannelClosed , ReadOnWriteStream , WriteOnReadStream ,
  StreamClosed , StreamChunkTooLarge
}
 Enum that describes values returned by streaming functions. 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...
 
std::string to_string (StreamError e)
 

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.

HTTPFetchResponseNotFound 

HTTP fetch response not found.

HTTPFetchRequestFailed 

HTTP fetch request failed.

HTTPChannelClosed 

HTTP Channel is closed.

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

StorageResponseNotFound 

Storage response not found.

StorageChannelClosed 

Storage channel closed.

◆ StreamError

enum class edjx::error::StreamError
strong

Enum that describes values returned by streaming functions.

Enumerator
Success 

Stream function completed successfully.

EndOfStream 

End of stream was reached.

Unknown 

An unknown error occurred.

SystemError 

System error occurred.

StreamNotFound 

Requested stream was not found.

StreamChannelClosed 

Stream channel has already been closed.

ReadOnWriteStream 

Read operation was attempted on a write-only stream.

WriteOnReadStream 

Write operation was attempted on a read-only stream.

StreamClosed 

Stream was already closed.

StreamChunkTooLarge 

Streamed chunk exceeds size limits.

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/4]

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/4]

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/4]

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

◆ to_string() [4/4]

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