BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions | Protected Member Functions
BeeeOn::MultiException Class Reference

MultiException is used to collect multiple exceptions thrown during some processing we do not want to interrupt. On every exception that occures during such processing, we add it into a prepared MultiException instance and after the processing finishes, we throw all the exceptions at once via the MultiException. More...

#include <MultiException.h>

Inheritance diagram for BeeeOn::MultiException:

Public Member Functions

 MultiException (const std::string &msg)
 Construct an instance of the MultiException with a custom initial message.
 
 MultiException (const std::vector< Poco::Exception > &e)
 Construct an instance of the MultiException from an already collected vector of exceptions.
 
 MultiException (const MultiException &e)
 
MultiExceptionoperator= (const MultiException &e)
 
const char * name () const noexceptoverride
 
Poco::Exception * clone () const override
 
void rethrow () const override
 
void caught (const Poco::Exception &e)
 Add a caught exception for later processing. It also constructs the message to contain a limited number of messages from those exceptions. To see all exceptions, it is necessary to iterate over the MultiException instance.
 
std::vector< Poco::Exception * >
::const_iterator 
begin () const
 
std::vector< Poco::Exception * >
::const_iterator 
end () const
 
bool empty () const
 
size_t count () const
 

Protected Member Functions

void add (const Poco::Exception &e)
 
void clear ()
 

Detailed Description

MultiException is used to collect multiple exceptions thrown during some processing we do not want to interrupt. On every exception that occures during such processing, we add it into a prepared MultiException instance and after the processing finishes, we throw all the exceptions at once via the MultiException.

Member Function Documentation

size_t MultiException::count ( ) const
Returns
count of caught exceptions.
bool MultiException::empty ( ) const
Returns
false when there are no exceptions registerd (so there was no fail during processing and MultiException can be dropped).

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