PDI 1.12.0-alpha.2026-05-07

the PDI data interface

PDI::Multiple_errors Class Reference

An error class to use when multiple errors of different kind have happened. More...

#include <error.h>

Inheritance diagram for PDI::Multiple_errors:
PDI::Error

Public Member Functions

 Multiple_errors (std::vector< std::exception_ptr > causes, std::string what) noexcept
 Creates a new Multiple_errors.
template<typename... Args>
 Multiple_errors (range_of_exception_ptrs auto &&causes, fmt::format_string< Args... > format_str, Args &&... args) noexcept
 Creates a new Multiple_errors.
std::vector< std::exception_ptr > const & nested_ptrs () const
 Gives access to the list or original errors.
std::string full_msg () const override
 Gives access to a full error message.
void rethrow_with_context (std::string msg) const override
 Rethrow the error with some context prepended to its description.

Detailed Description

An error class to use when multiple errors of different kind have happened.

Constructor & Destructor Documentation

◆ Multiple_errors() [1/2]

PDI::Multiple_errors::Multiple_errors ( std::vector< std::exception_ptr > causes,
std::string what )
noexcept

Creates a new Multiple_errors.

Parameters
[in]causesthe list or original errors
[in]whatan error message

◆ Multiple_errors() [2/2]

template<typename... Args>
PDI::Multiple_errors::Multiple_errors ( range_of_exception_ptrs auto && causes,
fmt::format_string< Args... > format_str,
Args &&... args )
inlinenoexcept

Creates a new Multiple_errors.

Parameters
[in]causesthe list or original errors
[in]format_stran error message as a python-style format
[in]argsthe fmt parameters for the message

Member Function Documentation

◆ nested_ptrs()

std::vector< std::exception_ptr > const & PDI::Multiple_errors::nested_ptrs ( ) const

Gives access to the list or original errors.

Returns
the list or original errors

◆ full_msg()

std::string PDI::Multiple_errors::full_msg ( ) const
overridevirtual

Gives access to a full error message.

The message includes all available context as well as the info about error type

Returns
the full message

Implements PDI::Error.

◆ rethrow_with_context()

void PDI::Multiple_errors::rethrow_with_context ( std::string context) const
overridevirtual

Rethrow the error with some context prepended to its description.

Parameters
contextthe context to prepend to the error message

Implements PDI::Error.


The documentation for this class was generated from the following file: