12#include <fmt/format.h>
33 : m_request(std::move(request)), m_source(std::move(source)), m_message(std::move(message)) {
39 -> std::vector<std::variant<
DaqSourceError, std::exception_ptr>> const& {
48 std::copy(errors.begin(), errors.end(), std::back_inserter(m_errors));
53 std::vector<std::variant<DaqSourceError, std::exception_ptr>> errors)
54 : m_errors(std::move(errors)) {
58void DaqSourceErrors::Update() {
59 for (
auto const& e : m_errors) {
60 if (
auto const* ptr = std::get_if<DaqSourceError>(&e); ptr) {
61 m_what += ptr->what();
63 }
else if (
auto const* ptr = std::get_if<std::exception_ptr>(&e); ptr) {
70 return m_what.c_str();
Represents error in single source.
char const * what() const noexcept override
DaqSourceError(std::string request, std::string source, std::string message)
auto Errors() const noexcept -> std::vector< std::variant< DaqSourceError, std::exception_ptr > > const &
char const * what() const noexcept override
DaqSourceErrors(std::vector< std::exception_ptr > errors)
Contains error related declarations for DAQ.
void FormatException(std::ostream &os, std::exception_ptr ptr)
Report without nesting.
std::ostream & operator<<(std::ostream &os, AsyncProcessIf const &proc)
Formats proc representation in the form [<pid>] <args>
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 ...