annotate DEPENDENCIES/generic/include/boost/thread/exceptions.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 // Copyright (C) 2001-2003
Chris@16 2 // William E. Kempf
Chris@16 3 // Copyright (C) 2007-9 Anthony Williams
Chris@16 4 // (C) Copyright 2011-2012 Vicente J. Botet Escriba
Chris@16 5 //
Chris@16 6 // Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 7 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 8
Chris@16 9 #ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H
Chris@16 10 #define BOOST_THREAD_EXCEPTIONS_PDM070801_H
Chris@16 11
Chris@16 12 #include <boost/thread/detail/config.hpp>
Chris@16 13
Chris@16 14 // pdm: Sorry, but this class is used all over the place & I end up
Chris@16 15 // with recursive headers if I don't separate it
Chris@16 16 // wek: Not sure why recursive headers would cause compilation problems
Chris@16 17 // given the include guards, but regardless it makes sense to
Chris@16 18 // seperate this out any way.
Chris@16 19
Chris@16 20 #include <string>
Chris@16 21 #include <stdexcept>
Chris@16 22 #include <boost/system/system_error.hpp>
Chris@16 23 #include <boost/system/error_code.hpp>
Chris@16 24
Chris@16 25
Chris@16 26 #include <boost/config/abi_prefix.hpp>
Chris@16 27
Chris@16 28 namespace boost
Chris@16 29 {
Chris@16 30
Chris@16 31 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
Chris@16 32 class BOOST_SYMBOL_VISIBLE thread_interrupted
Chris@16 33 {};
Chris@16 34 #endif
Chris@16 35
Chris@16 36 class BOOST_SYMBOL_VISIBLE thread_exception:
Chris@16 37 public system::system_error
Chris@16 38 //public std::exception
Chris@16 39 {
Chris@16 40 typedef system::system_error base_type;
Chris@16 41 public:
Chris@16 42 thread_exception()
Chris@16 43 : base_type(0,system::system_category())
Chris@16 44 {}
Chris@16 45
Chris@16 46 thread_exception(int sys_error_code)
Chris@16 47 : base_type(sys_error_code, system::system_category())
Chris@16 48 {}
Chris@16 49
Chris@16 50 thread_exception( int ev, const char * what_arg )
Chris@16 51 : base_type(system::error_code(ev, system::system_category()), what_arg)
Chris@16 52 {
Chris@16 53 }
Chris@16 54 thread_exception( int ev, const std::string & what_arg )
Chris@16 55 : base_type(system::error_code(ev, system::system_category()), what_arg)
Chris@16 56 {
Chris@16 57 }
Chris@16 58
Chris@16 59 ~thread_exception() throw()
Chris@16 60 {}
Chris@16 61
Chris@16 62
Chris@16 63 int native_error() const
Chris@16 64 {
Chris@16 65 return code().value();
Chris@16 66 }
Chris@16 67
Chris@16 68 };
Chris@16 69
Chris@16 70 class BOOST_SYMBOL_VISIBLE condition_error:
Chris@16 71 public system::system_error
Chris@16 72 //public std::exception
Chris@16 73 {
Chris@16 74 typedef system::system_error base_type;
Chris@16 75 public:
Chris@16 76 condition_error()
Chris@16 77 : base_type(system::error_code(0, system::system_category()), "Condition error")
Chris@16 78 {}
Chris@16 79 condition_error( int ev )
Chris@16 80 : base_type(system::error_code(ev, system::system_category()), "Condition error")
Chris@16 81 {
Chris@16 82 }
Chris@16 83 condition_error( int ev, const char * what_arg )
Chris@16 84 : base_type(system::error_code(ev, system::system_category()), what_arg)
Chris@16 85 {
Chris@16 86 }
Chris@16 87 condition_error( int ev, const std::string & what_arg )
Chris@16 88 : base_type(system::error_code(ev, system::system_category()), what_arg)
Chris@16 89 {
Chris@16 90 }
Chris@16 91 };
Chris@16 92
Chris@16 93
Chris@16 94 class BOOST_SYMBOL_VISIBLE lock_error:
Chris@16 95 public thread_exception
Chris@16 96 {
Chris@16 97 typedef thread_exception base_type;
Chris@16 98 public:
Chris@16 99 lock_error()
Chris@16 100 : base_type(0, "boost::lock_error")
Chris@16 101 {}
Chris@16 102
Chris@16 103 lock_error( int ev )
Chris@16 104 : base_type(ev, "boost::lock_error")
Chris@16 105 {
Chris@16 106 }
Chris@16 107 lock_error( int ev, const char * what_arg )
Chris@16 108 : base_type(ev, what_arg)
Chris@16 109 {
Chris@16 110 }
Chris@16 111 lock_error( int ev, const std::string & what_arg )
Chris@16 112 : base_type(ev, what_arg)
Chris@16 113 {
Chris@16 114 }
Chris@16 115
Chris@16 116 ~lock_error() throw()
Chris@16 117 {}
Chris@16 118
Chris@16 119 };
Chris@16 120
Chris@16 121 class BOOST_SYMBOL_VISIBLE thread_resource_error:
Chris@16 122 public thread_exception
Chris@16 123 {
Chris@16 124 typedef thread_exception base_type;
Chris@16 125 public:
Chris@16 126 thread_resource_error()
Chris@101 127 : base_type(static_cast<int>(system::errc::resource_unavailable_try_again), "boost::thread_resource_error")
Chris@16 128 {}
Chris@16 129
Chris@16 130 thread_resource_error( int ev )
Chris@16 131 : base_type(ev, "boost::thread_resource_error")
Chris@16 132 {
Chris@16 133 }
Chris@16 134 thread_resource_error( int ev, const char * what_arg )
Chris@16 135 : base_type(ev, what_arg)
Chris@16 136 {
Chris@16 137 }
Chris@16 138 thread_resource_error( int ev, const std::string & what_arg )
Chris@16 139 : base_type(ev, what_arg)
Chris@16 140 {
Chris@16 141 }
Chris@16 142
Chris@16 143
Chris@16 144 ~thread_resource_error() throw()
Chris@16 145 {}
Chris@16 146
Chris@16 147 };
Chris@16 148
Chris@16 149 class BOOST_SYMBOL_VISIBLE unsupported_thread_option:
Chris@16 150 public thread_exception
Chris@16 151 {
Chris@16 152 typedef thread_exception base_type;
Chris@16 153 public:
Chris@16 154 unsupported_thread_option()
Chris@101 155 : base_type(static_cast<int>(system::errc::invalid_argument), "boost::unsupported_thread_option")
Chris@16 156 {}
Chris@16 157
Chris@16 158 unsupported_thread_option( int ev )
Chris@16 159 : base_type(ev, "boost::unsupported_thread_option")
Chris@16 160 {
Chris@16 161 }
Chris@16 162 unsupported_thread_option( int ev, const char * what_arg )
Chris@16 163 : base_type(ev, what_arg)
Chris@16 164 {
Chris@16 165 }
Chris@16 166 unsupported_thread_option( int ev, const std::string & what_arg )
Chris@16 167 : base_type(ev, what_arg)
Chris@16 168 {
Chris@16 169 }
Chris@16 170
Chris@16 171 };
Chris@16 172
Chris@16 173 class BOOST_SYMBOL_VISIBLE invalid_thread_argument:
Chris@16 174 public thread_exception
Chris@16 175 {
Chris@16 176 typedef thread_exception base_type;
Chris@16 177 public:
Chris@16 178 invalid_thread_argument()
Chris@101 179 : base_type(static_cast<int>(system::errc::invalid_argument), "boost::invalid_thread_argument")
Chris@16 180 {}
Chris@16 181
Chris@16 182 invalid_thread_argument( int ev )
Chris@16 183 : base_type(ev, "boost::invalid_thread_argument")
Chris@16 184 {
Chris@16 185 }
Chris@16 186 invalid_thread_argument( int ev, const char * what_arg )
Chris@16 187 : base_type(ev, what_arg)
Chris@16 188 {
Chris@16 189 }
Chris@16 190 invalid_thread_argument( int ev, const std::string & what_arg )
Chris@16 191 : base_type(ev, what_arg)
Chris@16 192 {
Chris@16 193 }
Chris@16 194
Chris@16 195 };
Chris@16 196
Chris@16 197 class BOOST_SYMBOL_VISIBLE thread_permission_error:
Chris@16 198 public thread_exception
Chris@16 199 {
Chris@16 200 typedef thread_exception base_type;
Chris@16 201 public:
Chris@16 202 thread_permission_error()
Chris@101 203 : base_type(static_cast<int>(system::errc::permission_denied), "boost::thread_permission_error")
Chris@16 204 {}
Chris@16 205
Chris@16 206 thread_permission_error( int ev )
Chris@16 207 : base_type(ev, "boost::thread_permission_error")
Chris@16 208 {
Chris@16 209 }
Chris@16 210 thread_permission_error( int ev, const char * what_arg )
Chris@16 211 : base_type(ev, what_arg)
Chris@16 212 {
Chris@16 213 }
Chris@16 214 thread_permission_error( int ev, const std::string & what_arg )
Chris@16 215 : base_type(ev, what_arg)
Chris@16 216 {
Chris@16 217 }
Chris@16 218
Chris@16 219 };
Chris@16 220
Chris@16 221 } // namespace boost
Chris@16 222
Chris@16 223 #include <boost/config/abi_suffix.hpp>
Chris@16 224
Chris@16 225 #endif