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