26 std::unique_ptr<XrdCl::AnyObject> response(resp);
27 std::unique_ptr<XrdCl::XRootDStatus>
status(stat);
40 XrdCl::ChunkInfo *read_info;
41 response->Get(read_info);
46 XrdCl::VectorReadInfo *read_info;
47 response->Get(read_info);
48 m_promise.set_value(read_info->GetSize());
54 edm::LogWarning(
"XrdAdaptorInternal") <<
"XrdRequestManager::handle(name='"
56 << (source ? source->
PrettyID() :
"(unknown source)")
57 <<
"; failed with error '" <<
status->ToStr() <<
"' (errno="
69 if (ex.
getCode() == XrdCl::errInvalidResponse)
71 m_promise.set_exception(std::current_exception());
78 ex.
addContext(
"XrdAdaptor::ClientRequest::HandleResponse() failure while running connection recovery");
80 ss <<
"Original error: '" <<
status->ToStr() <<
"' (errno="
81 <<
status->errNo <<
", code=" <<
status->code <<
", source=" << (source ? source->
PrettyID() :
"(unknown source)") <<
").";
83 m_promise.set_exception(std::current_exception());
84 edm::LogWarning(
"XrdAdaptorInternal") <<
"Caught a CMSSW exception when running connection recovery.";
90 <<
") failed with error '" <<
status->ToStr()
91 <<
"' (errno=" <<
status->errNo <<
", code="
92 <<
status->code <<
"). Unknown exception occurred when running"
93 <<
" connection recovery.";
94 ex.
addContext(
"Calling XrdRequestManager::handle()");
97 m_promise.set_exception(std::make_exception_ptr(ex));
98 edm::LogWarning(
"XrdAdaptorInternal") <<
"Caught a new exception when running connection recovery.";
const std::string & getFilename() const
const std::string & PrettyID() const
edm::propagate_const< std::shared_ptr< ClientRequest > > m_self_reference
edm::propagate_const< std::shared_ptr< XrdReadStatistics > > m_stats
void addConnections(cms::Exception &) const
void addAdditionalInfo(std::string const &info)
std::shared_ptr< ClientRequest const > self_reference() const
void requestFailure(std::shared_ptr< XrdAdaptor::ClientRequest > c_ptr, XrdCl::Status &c_status)
RequestManager & m_manager
void addContext(std::string const &context)
void swap(QualityMetricWatch &)
#define FAKE_ERROR_COUNTER
edm::propagate_const< std::shared_ptr< Source > > m_source
std::promise< IOSize > m_promise
static std::string const source
static std::atomic< int > g_fakeError