lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::Fabrics::ErrorHandler Class Reference

Base class that keeps the last error number and a formatted error message (256-byte buffer). More...

#include <Endpoint.hh>

Inherited by Pds::Fabrics::CompletionPoller, Pds::Fabrics::CompletionQueue, Pds::Fabrics::EndpointBase, Pds::Fabrics::EventQueue, Pds::Fabrics::Fabric, and Pds::Fabrics::Info.

Public Member Functions

 ErrorHandler ()
 Allocate the message buffer and start with no error (FI_SUCCESS and a message built from the text None).
 
virtual ~ErrorHandler ()
 Free the message buffer.
 
int error_num () const
 Return the last recorded error number (FI_SUCCESS if none).
 
const char * error () const
 Return the last recorded error message.
 
void clear_error ()
 Reset the error number to FI_SUCCESS and the message to the no-error text.
 

Protected Member Functions

void set_custom_error (const char *fmt,...)
 
void set_error (const char *error_desc)
 

Protected Attributes

int _errno
 
char * _error
 

Detailed Description

Base class that keeps the last error number and a formatted error message (256-byte buffer).

Constructor & Destructor Documentation

◆ ErrorHandler()

Pds::Fabrics::ErrorHandler::ErrorHandler ( )

Allocate the message buffer and start with no error (FI_SUCCESS and a message built from the text None).

◆ ~ErrorHandler()

virtual Pds::Fabrics::ErrorHandler::~ErrorHandler ( )
virtual

Free the message buffer.

Member Function Documentation

◆ clear_error()

void Pds::Fabrics::ErrorHandler::clear_error ( )

Reset the error number to FI_SUCCESS and the message to the no-error text.

◆ error()

const char * Pds::Fabrics::ErrorHandler::error ( ) const

Return the last recorded error message.

◆ error_num()

int Pds::Fabrics::ErrorHandler::error_num ( ) const

Return the last recorded error number (FI_SUCCESS if none).

◆ set_custom_error()

void Pds::Fabrics::ErrorHandler::set_custom_error ( const char *  fmt,
  ... 
)
protected

◆ set_error()

void Pds::Fabrics::ErrorHandler::set_error ( const char *  error_desc)
protected

Member Data Documentation

◆ _errno

int Pds::Fabrics::ErrorHandler::_errno
protected

◆ _error

char* Pds::Fabrics::ErrorHandler::_error
protected

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