ARC SDK
Public Types | Public Member Functions
DataStaging::DTRErrorStatus Class Reference

A class to represent error states reported by various components. More...

#include <arc/data-staging/DTRStatus.h>

Public Types

enum  DTRErrorStatusType {
  NONE_ERROR, INTERNAL_LOGIC_ERROR, INTERNAL_PROCESS_ERROR, SELF_REPLICATION_ERROR,
  CACHE_ERROR, TEMPORARY_REMOTE_ERROR, PERMANENT_REMOTE_ERROR, LOCAL_FILE_ERROR,
  TRANSFER_SPEED_ERROR, STAGING_TIMEOUT_ERROR
}
 A list of error types. More...
 
enum  DTRErrorLocation {
  NO_ERROR_LOCATION, ERROR_SOURCE, ERROR_DESTINATION, ERROR_TRANSFER,
  ERROR_UNKNOWN
}
 Describes where the error occurred. More...
 

Public Member Functions

 DTRErrorStatus (DTRErrorStatusType status, DTRStatus::DTRStatusType error_state, DTRErrorLocation location, const std::string &desc="")
 Create a new DTRErrorStatus with given error states. More...
 
 DTRErrorStatus ()
 Create a new DTRErrorStatus with default none/null error states. More...
 
DTRErrorStatusType GetErrorStatus () const
 Returns the error type. More...
 
DTRStatus::DTRStatusType GetLastErrorState () const
 Returns the state in which the error occurred. More...
 
DTRErrorLocation GetErrorLocation () const
 Returns the location at which the error occurred. More...
 
std::string GetDesc () const
 Returns the error description. More...
 
bool operator== (const DTRErrorStatusType &s) const
 Returns true if this error status is the same as the given DTRErrorStatusType. More...
 
bool operator== (const DTRErrorStatus &s) const
 Returns true if this error status is the same as the given DTRErrorStatus. More...
 
bool operator!= (const DTRErrorStatusType &s) const
 Returns true if this error status is not the same as the given DTRErrorStatusType. More...
 
bool operator!= (const DTRErrorStatus &s) const
 Returns true if this error status is not the same as the given DTRErrorStatus. More...
 
DTRErrorStatusoperator= (const DTRErrorStatusType &s)
 Make a new DTRErrorStatus with the same error status as the given DTRErrorStatusType. More...
 

Detailed Description

A class to represent error states reported by various components.

Member Enumeration Documentation

◆ DTRErrorLocation

Describes where the error occurred.

Enumerator
NO_ERROR_LOCATION 

No error.

ERROR_SOURCE 

Error with source.

ERROR_DESTINATION 

Error with destination.

ERROR_TRANSFER 

Error during transfer not directly related to source or destination.

ERROR_UNKNOWN 

Error occurred in an unknown location.

◆ DTRErrorStatusType

A list of error types.

Enumerator
NONE_ERROR 

No error.

INTERNAL_LOGIC_ERROR 

Internal error in Data Staging logic.

INTERNAL_PROCESS_ERROR 

Internal processing error, like losing contact with external process.

SELF_REPLICATION_ERROR 

Attempt to replicate a file to itself.

CACHE_ERROR 

Permanent error with cache.

TEMPORARY_REMOTE_ERROR 

Temporary error with remote service.

PERMANENT_REMOTE_ERROR 

Permanent error with remote service.

LOCAL_FILE_ERROR 

Error with local file.

TRANSFER_SPEED_ERROR 

Transfer rate was too slow.

STAGING_TIMEOUT_ERROR 

Waited for too long to become staging.

Constructor & Destructor Documentation

◆ DTRErrorStatus() [1/2]

DataStaging::DTRErrorStatus::DTRErrorStatus ( DTRErrorStatusType  status,
DTRStatus::DTRStatusType  error_state,
DTRErrorLocation  location,
const std::string &  desc = "" 
)
inline

Create a new DTRErrorStatus with given error states.

Parameters
statusType of error
error_stateDTR state in which the error occurred
locationLocation of error (at source, destination or during transfer)
descText description of error

◆ DTRErrorStatus() [2/2]

DataStaging::DTRErrorStatus::DTRErrorStatus ( )
inline

Create a new DTRErrorStatus with default none/null error states.

Member Function Documentation

◆ GetDesc()

std::string DataStaging::DTRErrorStatus::GetDesc ( ) const
inline

Returns the error description.

◆ GetErrorLocation()

DTRErrorLocation DataStaging::DTRErrorStatus::GetErrorLocation ( ) const
inline

Returns the location at which the error occurred.

◆ GetErrorStatus()

DTRErrorStatusType DataStaging::DTRErrorStatus::GetErrorStatus ( ) const
inline

Returns the error type.

◆ GetLastErrorState()

DTRStatus::DTRStatusType DataStaging::DTRErrorStatus::GetLastErrorState ( ) const
inline

Returns the state in which the error occurred.

◆ operator!=() [1/2]

bool DataStaging::DTRErrorStatus::operator!= ( const DTRErrorStatusType s) const
inline

Returns true if this error status is not the same as the given DTRErrorStatusType.

◆ operator!=() [2/2]

bool DataStaging::DTRErrorStatus::operator!= ( const DTRErrorStatus s) const
inline

Returns true if this error status is not the same as the given DTRErrorStatus.

◆ operator=()

DTRErrorStatus& DataStaging::DTRErrorStatus::operator= ( const DTRErrorStatusType s)
inline

Make a new DTRErrorStatus with the same error status as the given DTRErrorStatusType.

Python interface deviation
Method is unavailable in Python interface

◆ operator==() [1/2]

bool DataStaging::DTRErrorStatus::operator== ( const DTRErrorStatusType s) const
inline

Returns true if this error status is the same as the given DTRErrorStatusType.

◆ operator==() [2/2]

bool DataStaging::DTRErrorStatus::operator== ( const DTRErrorStatus s) const
inline

Returns true if this error status is the same as the given DTRErrorStatus.


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