RxCpp
The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.
rx-composite_exception.hpp
Go to the documentation of this file.
1 // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2 
3 #pragma once
4 
5 #if !defined(RXCPP_SOURCES_RX_COMPOSITE_EXCEPTION_HPP)
6 #define RXCPP_SOURCES_RX_COMPOSITE_EXCEPTION_HPP
7 
8 #include "rx-includes.hpp"
9 
10 namespace rxcpp {
11 
12 struct composite_exception : std::exception {
13 
14  typedef std::vector<rxu::error_ptr> exception_values;
15 
16  virtual const char *what() const RXCPP_NOEXCEPT override {
17  return "rxcpp composite exception";
18  }
19 
20  virtual bool empty() const {
21  return exceptions.empty();
22  }
23 
24  virtual composite_exception add(rxu::error_ptr exception_ptr) {
25  exceptions.push_back(exception_ptr);
26  return *this;
27  }
28 
30 };
31 
32 }
33 
34 #endif
std::shared_ptr< util::detail::error_base > error_ptr
Definition: rx-util.hpp:874
Definition: rx-all.hpp:26
#define RXCPP_NOEXCEPT
Definition: rx-includes.hpp:157
exception_values exceptions
Definition: rx-composite_exception.hpp:29
virtual composite_exception add(rxu::error_ptr exception_ptr)
Definition: rx-composite_exception.hpp:24
std::vector< rxu::error_ptr > exception_values
Definition: rx-composite_exception.hpp:14
virtual const char * what() const RXCPP_NOEXCEPT override
Definition: rx-composite_exception.hpp:16
virtual bool empty() const
Definition: rx-composite_exception.hpp:20
Definition: rx-composite_exception.hpp:12