• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
whatrxcpp::composite_exception16     virtual const char *what() const RXCPP_NOEXCEPT override {
17         return "rxcpp composite exception";
18     }
19 
emptyrxcpp::composite_exception20     virtual bool empty() const {
21         return exceptions.empty();
22     }
23 
addrxcpp::composite_exception24     virtual composite_exception add(rxu::error_ptr exception_ptr) {
25         exceptions.push_back(exception_ptr);
26         return *this;
27     }
28 
29     exception_values exceptions;
30 };
31 
32 }
33 
34 #endif
35