• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #882

31 Aug 2023 07:44PM UTC coverage: 41.798% (-44.7%) from 86.546%
#882

push

19442 of 46514 relevant lines covered (41.8%)

126375.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/libs/core/serialization/include/hpx/serialization/exception_ptr.hpp
1
//  Copyright (c) 2007-2025 Hartmut Kaiser
2
//
3
//  SPDX-License-Identifier: BSL-1.0
4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6

7
#pragma once
8

9
#include <hpx/config.hpp>
10
#include <hpx/serialization/macros.hpp>
11
#include <hpx/serialization/serialization_fwd.hpp>
12

13
#include <exception>
14
#include <functional>
15

16
namespace hpx::util {
17

18
    HPX_CXX_EXPORT enum class exception_type {
19
        // unknown exception
20
        unknown_exception = 0,
21

22
        // standard exceptions
23
        std_runtime_error = 1,
24
        std_invalid_argument = 2,
25
        std_out_of_range = 3,
26
        std_logic_error = 4,
27
        std_bad_alloc = 5,
28
        std_bad_cast = 6,
29
        std_bad_typeid = 7,
30
        std_bad_exception = 8,
31
        std_exception = 9,
32

33
        // boost::system::system_error
34
        boost_system_error = 10,
35

36
        // hpx::exception
37
        hpx_exception = 11,
38
        hpx_thread_interrupted_exception = 12,
39

40
#if ASIO_HAS_BOOST_THROW_EXCEPTION != 0
41
        // boost exceptions
42
        boost_exception = 13,
43
#endif
44

45
        std_system_error = 14
46
    };
47
}    // namespace hpx::util
48

49
///////////////////////////////////////////////////////////////////////////////
50
namespace hpx::serialization {
51

52
    namespace detail {
53

54
        HPX_CXX_EXPORT using save_custom_exception_handler_type =
55
            std::function<void(hpx::serialization::output_archive&,
56
                std::exception_ptr const&, unsigned int)>;
57
        HPX_CXX_EXPORT using load_custom_exception_handler_type =
58
            std::function<void(hpx::serialization::input_archive&,
59
                std::exception_ptr&, unsigned int)>;
60

61
        HPX_CXX_EXPORT HPX_CORE_EXPORT void set_save_custom_exception_handler(
62
            save_custom_exception_handler_type f);
63
        HPX_CXX_EXPORT HPX_CORE_EXPORT void set_load_custom_exception_handler(
64
            load_custom_exception_handler_type f);
65
    }    // namespace detail
66

67
    ///////////////////////////////////////////////////////////////////////////
68
    HPX_CXX_EXPORT template <typename Archive>
69
    HPX_CORE_EXPORT void save(
70
        Archive& ar, std::exception_ptr const& e, unsigned int);
71

72
    ///////////////////////////////////////////////////////////////////////////
73
    HPX_CXX_EXPORT template <typename Archive>
74
    HPX_CORE_EXPORT void load(Archive& ar, std::exception_ptr& e, unsigned int);
75

×
76
    HPX_SERIALIZATION_SPLIT_FREE(HPX_CXX_EXPORT, std::exception_ptr)
77
}    // namespace hpx::serialization
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc