1 // Copyright (C) 2001-2003
3 // Copyright (C) 2007-9 Anthony Williams
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H
9 #define BOOST_THREAD_EXCEPTIONS_PDM070801_H
11 #include <boost/thread/detail/config.hpp>
13 // pdm: Sorry, but this class is used all over the place & I end up
14 // with recursive headers if I don't separate it
15 // wek: Not sure why recursive headers would cause compilation problems
16 // given the include guards, but regardless it makes sense to
17 // seperate this out any way.
22 #include <boost/config/abi_prefix.hpp>
27 class thread_interrupted
30 class thread_exception:
38 thread_exception(int sys_err_code):
39 m_sys_err(sys_err_code)
44 ~thread_exception() throw()
48 int native_error() const
58 class condition_error:
62 const char* what() const throw()
64 return "Condition error";
70 public thread_exception
76 lock_error(int sys_err_code):
77 thread_exception(sys_err_code)
84 virtual const char* what() const throw()
86 return "boost::lock_error";
90 class thread_resource_error:
91 public thread_exception
94 thread_resource_error()
97 thread_resource_error(int sys_err_code):
98 thread_exception(sys_err_code)
101 ~thread_resource_error() throw()
105 virtual const char* what() const throw()
107 return "boost::thread_resource_error";
112 class unsupported_thread_option:
113 public thread_exception
116 unsupported_thread_option()
119 unsupported_thread_option(int sys_err_code):
120 thread_exception(sys_err_code)
123 ~unsupported_thread_option() throw()
127 virtual const char* what() const throw()
129 return "boost::unsupported_thread_option";
134 class invalid_thread_argument:
135 public thread_exception
138 invalid_thread_argument()
141 invalid_thread_argument(int sys_err_code):
142 thread_exception(sys_err_code)
145 ~invalid_thread_argument() throw()
149 virtual const char* what() const throw()
151 return "boost::invalid_thread_argument";
156 class thread_permission_error:
157 public thread_exception
160 thread_permission_error()
163 thread_permission_error(int sys_err_code):
164 thread_exception(sys_err_code)
167 ~thread_permission_error() throw()
171 virtual const char* what() const throw()
173 return "boost::thread_permission_error";
180 #include <boost/config/abi_suffix.hpp>