xrootd
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdSsiErrInfo Class Reference

#include <XrdSsiErrInfo.hh>

Public Member Functions

void Clr ()
 Reset and clear error information.
 
const std::string & Get (int &eNum) const
 
const std::string & Get () const
 
int GetArg () const
 
bool hasError () const
 
bool isOK () const
 
void Set (const char *eMsg=0, int eNum=0, int eArg=0)
 
void Set (const std::string &eMsg, int eNum=0, int eArg=0)
 
XrdSsiErrInfooperator= (XrdSsiErrInfo const &rhs)
 Assignment operator.
 
 XrdSsiErrInfo (XrdSsiErrInfo const &oP)
 Copy constructor.
 
 XrdSsiErrInfo ()
 Constructor and Destructor.
 
 ~XrdSsiErrInfo ()
 

Private Member Functions

const char * Errno2Text (int ecode)
 

Private Attributes

std::string errText
 
int errNum
 
int errArg
 

Detailed Description

The XrdSsiErrInfo object is used to hold error information for many ssi client-oriented requests.

Constructor & Destructor Documentation

◆ XrdSsiErrInfo() [1/2]

XrdSsiErrInfo::XrdSsiErrInfo ( XrdSsiErrInfo const &  oP)
inline

Copy constructor.

References errArg, errNum, errText, and Set().

◆ XrdSsiErrInfo() [2/2]

XrdSsiErrInfo::XrdSsiErrInfo ( )
inline

Constructor and Destructor.

◆ ~XrdSsiErrInfo()

XrdSsiErrInfo::~XrdSsiErrInfo ( )
inline

Member Function Documentation

◆ Clr()

void XrdSsiErrInfo::Clr ( )
inline

Reset and clear error information.

References errArg, errNum, and errText.

◆ Errno2Text()

const char * XrdSsiErrInfo::Errno2Text ( int  ecode)
private

Referenced by Set(), and Set().

◆ Get() [1/2]

const std::string & XrdSsiErrInfo::Get ( ) const
inline

Get current error text.

Returns
The error text.

References errText.

◆ Get() [2/2]

const std::string & XrdSsiErrInfo::Get ( int &  eNum) const
inline

Get current error information.

Parameters
eNumplace where the error number is to be placed.
Returns
The error text and the error number value.

References errNum, and errText.

◆ GetArg()

int XrdSsiErrInfo::GetArg ( ) const
inline

Get current error argument.

Returns
the error argument value.

References errArg.

◆ hasError()

bool XrdSsiErrInfo::hasError ( ) const
inline

Check if there is an error.

Returns
True if an error exists and false otherwise.

References errNum.

◆ isOK()

bool XrdSsiErrInfo::isOK ( ) const
inline

Check if there is no error.

Returns
True if no error exists and false otherwise.

References errNum.

◆ operator=()

XrdSsiErrInfo & XrdSsiErrInfo::operator= ( XrdSsiErrInfo const &  rhs)
inline

Assignment operator.

References errArg, errNum, errText, and Set().

◆ Set() [1/2]

void XrdSsiErrInfo::Set ( const char *  eMsg = 0,
int  eNum = 0,
int  eArg = 0 
)
inline

Set new error information. There are two obvious variations.

Parameters
eMsgpointer to a string describing the error. If nil, the eNum is taken as errno and converted to corresponding description.
eNumthe error number associated with the error.
eArgthe error argument, if any (see XrdSsiService::Provision()).

References errArg, Errno2Text(), errNum, and errText.

Referenced by XrdSsiStream::GetBuff(), XrdSsiProvider::GetService(), operator=(), XrdSsiStream::SetBuff(), XrdSsiStream::SetBuff(), and XrdSsiErrInfo().

◆ Set() [2/2]

void XrdSsiErrInfo::Set ( const std::string &  eMsg,
int  eNum = 0,
int  eArg = 0 
)
inline

References errArg, Errno2Text(), errNum, and errText.

Member Data Documentation

◆ errArg

int XrdSsiErrInfo::errArg
private

◆ errNum

int XrdSsiErrInfo::errNum
private

◆ errText

std::string XrdSsiErrInfo::errText
private

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