12 #include <fmt/format.h>
33 : m_request(std::move(request)), m_source(std::move(source)), m_message(std::move(message)) {
43 std::copy(errors.begin(), errors.end(), std::back_inserter(
m_errors));
48 std::vector<std::variant<DaqSourceError, std::exception_ptr>> errors)
49 : m_errors(std::move(errors)) {
53 void DaqSourceErrors::Update() {
55 if (
auto const* ptr = std::get_if<DaqSourceError>(&e); ptr) {
56 m_what += ptr->what();
58 }
else if (
auto const* ptr = std::get_if<std::exception_ptr>(&e); ptr) {
65 return m_what.c_str();
char const * what() const noexcept override
DaqSourceError(std::string request, std::string source, std::string message)
char const * what() const noexcept override
DaqSourceErrors(std::vector< std::exception_ptr > errors)
std::vector< std::variant< DaqSourceError, std::exception_ptr > > m_errors
Contains error related declarations for DAQ.
void FormatException(std::ostream &os, std::exception_ptr ptr)
Report without nesting.
daqif::DaqStatus & operator<<(daqif::DaqStatus &status, daq::Status const &rhs)
Convert daq::Status -> daqif::DaqStatus by populating from rhs.
ErrorPolicy
Error policy supported by certain operations.
@ Strict
Any error is considered fatal and may lead to the operation being aborted.
@ Tolerant
Errors that can be ignored with partial completion of a command will be tolerated and is reported as ...