Loading...
Searching...
No Matches
XrdCl::Status Struct Reference

Procedure execution status. More...

`#include <XrdClStatus.hh>`

Inheritance diagram for XrdCl::Status:
Collaboration diagram for XrdCl::Status:

## Public Member Functions

| Status (uint16_t st=stOK, uint16_t cod=errNone, uint32_t errN=0)
| Constructor.
int | GetShellCode () const
| Get the status code that may be returned to the shell.
bool | IsError () const
| Error.
bool | IsFatal () const
| Fatal error.
bool | IsOK () const
| We're fine.
std::string | ToString () const
| Create a string representation.

## Static Public Member Functions

static bool | IsSocketError (uint16_t code)

## Public Attributes

uint16_t | code
| Error type, or additional hints on what to do.
uint32_t | errNo
| Errno, if any.
uint16_t | status
| Status of the execution.

## Detailed Description

Procedure execution status.

Definition at line 114 of file XrdClStatus.hh.

## Constructor & Destructor Documentation

## Status()

XrdCl::Status::Status | ( | uint16_t | st = stOK,
|  | uint16_t | cod = errNone,
|  | uint32_t | errN = 0 )

inline

Constructor.

Definition at line 119 of file XrdClStatus.hh.

:
status(st), code(cod), errNo( errN ) {}
XrdCl::Status::code
uint16_t code
Error type, or additional hints on what to do.
Definition XrdClStatus.hh:147
XrdCl::Status::status
uint16_t status
Status of the execution.
Definition XrdClStatus.hh:146
XrdCl::Status::errNo
uint32_t errNo
Errno, if any.
Definition XrdClStatus.hh:148

References code, errNo, XrdCl::errNone, status, and XrdCl::stOK.

Referenced by XrdCl::XRootDStatus::XRootDStatus(), and XrdCl::XRootDStatus::XRootDStatus().

Here is the caller graph for this function:

## Member Function Documentation

## GetShellCode()

int XrdCl::Status::GetShellCode | ( |  | ) | const

inline

Get the status code that may be returned to the shell.

Definition at line 129 of file XrdClStatus.hh.

{
if( IsOK() )
return 0;
return (code/100)+50;
}
XrdCl::Status::IsOK
bool IsOK() const
We're fine.
Definition XrdClStatus.hh:124

References code, and IsOK().

Referenced by ExecuteCommand(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

## IsError()

bool XrdCl::Status::IsError | ( |  | ) | const

inline

Error.

Definition at line 122 of file XrdClStatus.hh.

References status, and XrdCl::stError.

## IsFatal()

bool XrdCl::Status::IsFatal | ( |  | ) | const

inline

Fatal error.

Definition at line 123 of file XrdClStatus.hh.

References status, and XrdCl::stFatal.

Referenced by XrdCl::Stream::OnConnectError(), and ToString().

Here is the caller graph for this function:

## IsOK()

bool XrdCl::Status::IsOK | ( |  | ) | const

inline

We're fine.

Definition at line 124 of file XrdClStatus.hh.

References status, and XrdCl::stOK.

Referenced by XrdCl::ZipCache::ZipCache(), XrdPosixFile::~XrdPosixFile(), XrdCl::AssureFile(), XrdCl::Stream::CanCollapse(), XrdCl::Utils::CheckTPC(), XrdCl::Utils::CheckTPCLite(), XrdCl::FileSystem::ChMod(), XrdCl::EcHandler::Close(), XrdCl::File::Close(), XrdCl::FileStateHandler::Close(), XrdEc::StrmWriter::Close(), XrdPosixFile::Close(), XrdCl::ZipArchive::CloseArchive(), XrdCl::AsyncSocketHandler::Connect(), XrdCl::Socket::Connect(), XrdCl::Tls::Connect(), XrdCl::MessageUtils::CreateXAttrBody(), XrdCl::FileSystem::DeepLocate(), XrdCl::File::DelXAttr(), XrdCl::FileSystem::DelXAttr(), XrdCl::FileSystem::DirList(), XrdCl::FileSystem::DirList(), DoCache(), DoCat(), DoCD(), DoChMod(), DoLocate(), DoLS(), DoMkDir(), DoMv(), DoPrepare(), DoQuery(), DoRm(), DoRmDir(), DoSpaceInfo(), DoStat(), DoStatVFS(), DoTail(), DoTruncate(), DoXAttr(), XrdCl::Stream::EnableLink(), ProgressDisplay::EndJob(), ExecuteCommand(), ExecuteInteractive(), XrdPosixAdmin::FanOut(), XrdCl::File::Fcntl(), XrdCl::Socket::Flash(), XrdCl::Stream::ForceConnect(), XrdCl::XRootDTransport::GetBody(), XrdCl::GetEcHandler(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDTransport::GetMore(), XrdCl::Utils::GetProtocolVersion(), XrdCl::Utils::GetRemoteCheckSum(), XrdCl::GetResponse(), GetShellCode(), XrdCl::FileSystemUtils::GetSpaceInfo(), XrdCl::Utils::GetSupportedCheckSums(), XrdCl::File::GetXAttr(), XrdCl::FileSystem::GetXAttr(), XrdCl::AsyncSocketHandler::HandleHandShake(), XrdCl::ChunkHandler::HandleResponse(), XrdCl::EcPgReadResponseHandler::HandleResponse(), XrdCl::FutureWrapper< Response >::HandleResponse(), XrdCl::FutureWrapper< void >::HandleResponse(), XrdCl::MetalinkReadHandler::HandleResponse(), XrdCl::PgReadSubstitutionHandler::HandleResponse(), XrdCl::UnpackXAttrStatus::HandleResponse(), XrdCl::ZipListHandler::HandleResponse(), XrdPosixFile::HandleResponse(), XrdPosixFileRH::HandleResponse(), XrdCl::AssignLastURLHandler::HandleResponseWithHosts(), XrdCl::AssignLBHandler::HandleResponseWithHosts(), XrdCl::ExOpenFuncWrapper::HandleResponseWithHosts(), XrdCl::MetalinkOpenHandler::HandleResponseWithHosts(), IndexRemote(), XrdCl::Socket::Initialize(), XrdCl::XRootDMsgHandler::InspectStatusRsp(), XrdCl::File::ListXAttr(), XrdCl::FileSystem::ListXAttr(), XrdCl::MetalinkRedirector::Load(), XrdCl::FileSystem::Locate(), main(), main(), XrdCl::FileSystem::MkDir(), XrdCl::FileSystem::Mv(), XrdCl::Stream::OnConnect(), XrdCl::Stream::OnConnectError(), XrdCl::AsyncSocketHandler::OnConnectionReturn(), XrdCl::Stream::OnError(), XrdCl::FileStateHandler::OnOpen(), XrdCl::AsyncSocketHandler::OnRead(), XrdCl::Stream::OnReadTimeout(), XrdCl::AsyncSocketHandler::OnReadWhileHandshaking(), XrdCl::FileStateHandler::OnStateError(), XrdCl::XRootDMsgHandler::OnStatusReady(), XrdCl::AsyncSocketHandler::OnTLSHandShake(), XrdCl::AsyncSocketHandler::OnWrite(), XrdCl::AsyncSocketHandler::OnWriteWhileHandshaking(), XrdCl::EcHandler::Open(), XrdCl::File::Open(), XrdCl::FileStateHandler::Open(), XrdCl::LocalFileHandler::Open(), xrdcl_proxy::ProxyPrefixFile::Open(), XrdCl::File::PgRead(), XrdCl::FileStateHandler::PgRead(), XrdPosixFile::pgRead(), XrdCl::FileStateHandler::PgReadRetry(), XrdCl::File::PgWrite(), XrdCl::FileStateHandler::PgWrite(), XrdPosixFile::pgWrite(), XrdPosixFile::pgWrite(), XrdCl::FileSystem::Ping(), XrdCl::CopyProcess::Prepare(), XrdCl::FileSystem::Prepare(), XrdCl::XRootDMsgHandler::Process(), XrdCl::Utils::ProcessConfigDir(), XrdCl::FileSystem::Protocol(), XrdSsiSessReal::Provision(), XrdCl::FileSystem::Query(), XrdCl::AsyncHSReader::Read(), XrdCl::AsyncMsgReader::Read(), XrdCl::AsyncRawReader::Read(), XrdCl::AsyncVectorReader::Read(), XrdCl::File::Read(), XrdCl::Tls::Read(), XrdEc::Reader::Read(), XrdPosixFile::Read(), XrdPosixFile::Read(), XrdCl::AsyncRawReaderIntfc::ReadBytesAsync(), XrdCl::ZipArchive::ReadFromImpl, XrdCl::File::ReadV(), XrdPosixFile::ReadV(), XrdPosixFile::ReadV(), XrdCl::MessageUtils::RedirectMessage(), XrdCl::RedirectorRegistry::RegisterAndWait(), XrdPosixMap::Result(), XrdCl::FileSystem::Rm(), XrdCl::FileSystem::RmDir(), XrdCl::ClassicCopyJob::Run(), XrdCl::CopyProcess::Run(), XrdCl::Operation< HasHndl >::Run(), XrdCl::ThirdPartyCopyJob::Run(), XrdCl::TPFallBackCopyJob::Run(), XrdCl::CloseFileImpl< false >::RunImpl(), XrdCl::DelXAttrFsImpl< HasHndl >::RunImpl(), XrdCl::DelXAttrImpl< HasHndl >::RunImpl(), XrdCl::GetXAttrFsImpl< HasHndl >::RunImpl(), XrdCl::GetXAttrImpl< HasHndl >::RunImpl(), XrdCl::OpenFileImpl< HasHndl >::RunImpl(), XrdCl::SetXAttrFsImpl< HasHndl >::RunImpl(), XrdCl::SetXAttrImpl< HasHndl >::RunImpl(), XrdCl::ZipListImpl< HasHndl >::RunImpl(), XrdCl::ZipStatImpl< HasHndl >::RunImpl(), XrdCl::FileSystemData::Send(), XrdCl::Socket::Send(), XrdCl::Stream::Send(), XrdCl::Tls::Send(), XrdCl::FileSystem::SendCache(), XrdCl::FileSystem::SendInfo(), XrdCl::MessageUtils::SendMessage(), XrdSsiTaskReal::SetBuff(), XrdSsiTaskReal::SetBuff(), XrdCl::File::SetXAttr(), XrdCl::FileSystem::SetXAttr(), XrdCl::File::Stat(), XrdCl::FileSystem::Stat(), XrdPosixAdmin::Stat(), XrdPosixAdmin::Stat(), XrdPosixFile::Stat(), XrdCl::FileSystem::StatVFS(), XrdCl::File::Sync(), XrdPosixFile::Sync(), ToString(), XrdCl::File::Truncate(), XrdCl::FileSystem::Truncate(), XrdSsiSessReal::Unprovision(), XrdCl::File::VectorRead(), XrdCl::File::VectorWrite(), XrdCl::File::Visa(), XrdCl::MessageUtils::WaitForResponse(), XrdCl::ResponseHandler::Wrap(), XrdCl::ResponseHandler::Wrap(), XrdCl::AsyncHSWriter::Write(), XrdCl::AsyncMsgWriter::Write(), XrdCl::File::Write(), XrdCl::File::Write(), XrdCl::File::Write(), XrdCl::FileStateHandler::Write(), XrdEc::StrmWriter::Write(), XrdPosixFile::Write(), XrdPosixFile::Write(), XrdCl::XRootDMsgHandler::WriteMessageBody(), XrdCl::File::WriteV(), XrdSsiSessReal::XeqEvent(), XrdSsiTaskReal::XeqEvent(), and XrdFfsPosix_mkdir().

## IsSocketError()

bool XrdCl::Status::IsSocketError | ( | uint16_t | code | ) |

inline static

Definition at line 136 of file XrdClStatus.hh.

{
return int( code / 100 ) == 1;
}

References code.

## ToString()

std::string XrdCl::Status::ToString | ( |  | ) | const

Create a string representation.

Definition at line 97 of file XrdClStatus.cc.

{
std::ostringstream o;
//--------------------------------------------------------------------------
// The status is OK
//--------------------------------------------------------------------------
if( IsOK() )
{
o << "[SUCCESS] ";
if( code == suContinue )
o << "Continue";
else if( code == suRetry )
o << "Retry";
return o.str();
}
//--------------------------------------------------------------------------
// We have an error
//--------------------------------------------------------------------------
if( IsFatal() )
o << "[FATAL] ";
else
o << "[ERROR] ";
o << GetErrorMessage( code );
//--------------------------------------------------------------------------
// Add errno
//--------------------------------------------------------------------------
if( errNo >= kXR_ArgInvalid ) // kXR_ArgInvalid is the first (lowest) xrootd error code
// it is used in an inconsistent way sometimes it is
// xrootd error code and sometimes it is a plain errno
o << ": " << XrdSysE2T( XProtocol::toErrno( errNo ) );
else if ( errNo )
o << ": " << XrdSysE2T( errNo );
return o.str();
}
kXR_ArgInvalid
@ kXR_ArgInvalid
Definition XProtocol.hh:990
XrdSysE2T
const char * XrdSysE2T(int errcode)
Definition XrdSysE2T.cc:104
XProtocol::toErrno
static int toErrno(int xerr)
Definition XProtocol.hh:1411
XrdCl::suRetry
const uint16_t suRetry
Definition XrdClStatus.hh:40
XrdCl::suContinue
const uint16_t suContinue
Definition XrdClStatus.hh:39
XrdCl::Status::IsFatal
bool IsFatal() const
Fatal error.
Definition XrdClStatus.hh:123

References code, errNo, IsFatal(), IsOK(), kXR_ArgInvalid, XrdCl::suContinue, XrdCl::suRetry, XProtocol::toErrno(), and XrdSysE2T().

Referenced by XrdCl::AssureFile(), XrdPosixXrootd::Close(), XrdCl::ZipArchive::CloseArchive(), XrdCl::AsyncSocketHandler::Connect(), XrdPosixFile::DelayedDestroy(), DoRm(), XrdCl::Stream::ForceError(), main(), XrdCl::Stream::OnError(), XrdCl::AsyncSocketHandler::OnFault(), XrdCl::AsyncSocketHandler::OnFaultWhileHandshaking(), XrdCl::Utils::ProcessConfigDir(), XrdCl::MessageUtils::RedirectMessage(), XrdCl::ClassicCopyJob::Run(), XrdCl::MessageUtils::SendMessage(), and XrdCl::XRootDStatus::ToStr().

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Data Documentation

## code

uint16_t XrdCl::Status::code

Error type, or additional hints on what to do.

Definition at line 147 of file XrdClStatus.hh.

Referenced by Status(), XrdCl::XRootDStatus::XRootDStatus(), XrdCl::File::Close(), XrdCl::FileStateHandler::Close(), XrdCl::Socket::ConnectToAddress(), XrdCl::FileSystem::DirList(), DoLocate(), DoLS(), DoSpaceInfo(), XrdCl::AsyncSocketHandler::DoTlsHandShake(), Fatal(), XrdCl::PropertyList::Get(), XrdCl::XRootDTransport::GetBody(), XrdSsiUtils::GetErr(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDTransport::GetMore(), GetShellCode(), XrdCl::FileSystemUtils::GetSpaceInfo(), XrdCl::AsyncSocketHandler::HandleHandShake(), XrdCl::AssignLastURLHandler::HandleResponseWithHosts(), XrdCl::AssignLBHandler::HandleResponseWithHosts(), XrdCl::XRootDMsgHandler::InspectStatusRsp(), IsSocketError(), XrdCl::AsyncSocketHandler::OnConnectionReturn(), XrdCl::AsyncSocketHandler::OnRead(), XrdCl::AsyncSocketHandler::OnReadWhileHandshaking(), XrdCl::FileStateHandler::OnStateError(), XrdCl::AsyncSocketHandler::OnTLSHandShake(), XrdCl::AsyncSocketHandler::OnWrite(), XrdCl::AsyncSocketHandler::OnWriteWhileHandshaking(), XrdCl::LocalFileHandler::Open(), XrdCl::AsyncHSReader::Read(), XrdCl::AsyncMsgReader::Read(), XrdCl::AsyncRawReader::Read(), XrdCl::AsyncVectorReader::Read(), XrdCl::AsyncRawReaderIntfc::ReadBytesAsync(), XrdPosixMap::Result(), XrdCl::ClassicCopyJob::Run(), XrdCl::TPFallBackCopyJob::Run(), XrdCl::Socket::Send(), XrdCl::PropertyList::Set(), XrdSsiUtils::SetErr(), XrdCl::XRootDStatus::ToStr(), ToString(), XrdCl::ResponseHandler::Wrap(), XrdCl::ResponseHandler::Wrap(), XrdCl::AsyncHSWriter::Write(), XrdCl::AsyncMsgWriter::Write(), and XrdCl::XRootDMsgHandler::WriteMessageBody().

## errNo

uint32_t XrdCl::Status::errNo

Errno, if any.

Definition at line 148 of file XrdClStatus.hh.

Referenced by Status(), XrdCl::Socket::ConnectToAddress(), XrdCl::PropertyList::Get(), XrdSsiUtils::GetErr(), main(), XrdPosixMap::Result(), XrdCl::PropertyList::Set(), XrdSsiUtils::SetErr(), XrdCl::XRootDStatus::ToStr(), ToString(), XrdCl::AsyncHSWriter::Write(), and XrdCl::AsyncMsgWriter::Write().

## status

uint16_t XrdCl::Status::status

Status of the execution.

Definition at line 146 of file XrdClStatus.hh.

Referenced by Status(), XrdCl::Utils::CheckTPC(), XrdCl::Utils::CheckTPCLite(), XrdCl::AsyncSocketHandler::Connect(), XrdCl::Stream::EnableLink(), XrdCl::PropertyList::Get(), IsError(), IsFatal(), IsOK(), XrdCl::Socket::ReadRaw(), XrdCl::Stream::Send(), XrdCl::PropertyList::Set(), and XrdCl::Socket::WriteRaw().

The documentation for this struct was generated from the following files:

- XrdClStatus.hh
- XrdClStatus.cc