First public contribution.
1 // Copyright (C) 2001-2003
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)
7 #ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H
8 #define BOOST_THREAD_EXCEPTIONS_PDM070801_H
10 #include <boost/thread/detail/config.hpp>
12 // pdm: Sorry, but this class is used all over the place & I end up
13 // with recursive headers if I don't separate it
14 // wek: Not sure why recursive headers would cause compilation problems
15 // given the include guards, but regardless it makes sense to
16 // seperate this out any way.
23 class BOOST_THREAD_DECL thread_exception : public std::exception
27 thread_exception(int sys_err_code);
30 ~thread_exception() throw();
32 int native_error() const;
38 class BOOST_THREAD_DECL lock_error : public thread_exception
42 lock_error(int sys_err_code);
43 ~lock_error() throw();
45 virtual const char* what() const throw();
48 class BOOST_THREAD_DECL thread_resource_error : public thread_exception
51 thread_resource_error();
52 thread_resource_error(int sys_err_code);
53 ~thread_resource_error() throw();
55 virtual const char* what() const throw();
58 class BOOST_THREAD_DECL unsupported_thread_option : public thread_exception
61 unsupported_thread_option();
62 unsupported_thread_option(int sys_err_code);
63 ~unsupported_thread_option() throw();
65 virtual const char* what() const throw();
68 class BOOST_THREAD_DECL invalid_thread_argument : public thread_exception
71 invalid_thread_argument();
72 invalid_thread_argument(int sys_err_code);
73 ~invalid_thread_argument() throw();
75 virtual const char* what() const throw();
78 class BOOST_THREAD_DECL thread_permission_error : public thread_exception
81 thread_permission_error();
82 thread_permission_error(int sys_err_code);
83 ~thread_permission_error() throw();
85 virtual const char* what() const throw();
90 #endif // BOOST_THREAD_CONFIG_PDM070801_H
93 // 3 Jan 03 WEKEMPF Modified for DLL implementation.