xrootd
Public Member Functions | Private Attributes | List of all members
XrdSsiErrInfo Class Reference

#include <XrdSsiErrInfo.hh>

Public Member Functions

void Clr ()
 Reset and clear error information. More...
 
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. More...
 
 XrdSsiErrInfo (XrdSsiErrInfo const &oP)
 Copy constructor. More...
 
 XrdSsiErrInfo ()
 Constructor and Destructor. More...
 
 ~XrdSsiErrInfo ()
 

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.

◆ Get() [1/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.

◆ Get() [2/2]

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

Get current error text.

Returns
The error text.

References 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 strerror(eNum) is used.
eNumthe error number associated with the error.
eArgthe error argument, if any (see XrdSsiService::Provision()).

References errArg, errNum, and errText.

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

◆ Set() [2/2]

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

References errArg, errNum, and errText.

Member Data Documentation

◆ errArg

int XrdSsiErrInfo::errArg
private

◆ errNum

int XrdSsiErrInfo::errNum
private

◆ errText

std::string XrdSsiErrInfo::errText
private

Referenced by Clr(), Get(), operator=(), Set(), and XrdSsiErrInfo().


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