sl@0: // Copyright (C) 2001-2003 sl@0: // William E. Kempf sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. (See accompanying sl@0: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: #ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H sl@0: #define BOOST_THREAD_EXCEPTIONS_PDM070801_H sl@0: sl@0: #include sl@0: sl@0: // pdm: Sorry, but this class is used all over the place & I end up sl@0: // with recursive headers if I don't separate it sl@0: // wek: Not sure why recursive headers would cause compilation problems sl@0: // given the include guards, but regardless it makes sense to sl@0: // seperate this out any way. sl@0: sl@0: #include sl@0: #include sl@0: sl@0: namespace boost { sl@0: sl@0: class BOOST_THREAD_DECL thread_exception : public std::exception sl@0: { sl@0: protected: sl@0: thread_exception(); sl@0: thread_exception(int sys_err_code); sl@0: sl@0: public: sl@0: ~thread_exception() throw(); sl@0: sl@0: int native_error() const; sl@0: sl@0: private: sl@0: int m_sys_err; sl@0: }; sl@0: sl@0: class BOOST_THREAD_DECL lock_error : public thread_exception sl@0: { sl@0: public: sl@0: lock_error(); sl@0: lock_error(int sys_err_code); sl@0: ~lock_error() throw(); sl@0: sl@0: virtual const char* what() const throw(); sl@0: }; sl@0: sl@0: class BOOST_THREAD_DECL thread_resource_error : public thread_exception sl@0: { sl@0: public: sl@0: thread_resource_error(); sl@0: thread_resource_error(int sys_err_code); sl@0: ~thread_resource_error() throw(); sl@0: sl@0: virtual const char* what() const throw(); sl@0: }; sl@0: sl@0: class BOOST_THREAD_DECL unsupported_thread_option : public thread_exception sl@0: { sl@0: public: sl@0: unsupported_thread_option(); sl@0: unsupported_thread_option(int sys_err_code); sl@0: ~unsupported_thread_option() throw(); sl@0: sl@0: virtual const char* what() const throw(); sl@0: }; sl@0: sl@0: class BOOST_THREAD_DECL invalid_thread_argument : public thread_exception sl@0: { sl@0: public: sl@0: invalid_thread_argument(); sl@0: invalid_thread_argument(int sys_err_code); sl@0: ~invalid_thread_argument() throw(); sl@0: sl@0: virtual const char* what() const throw(); sl@0: }; sl@0: sl@0: class BOOST_THREAD_DECL thread_permission_error : public thread_exception sl@0: { sl@0: public: sl@0: thread_permission_error(); sl@0: thread_permission_error(int sys_err_code); sl@0: ~thread_permission_error() throw(); sl@0: sl@0: virtual const char* what() const throw(); sl@0: }; sl@0: sl@0: } // namespace boost sl@0: sl@0: #endif // BOOST_THREAD_CONFIG_PDM070801_H sl@0: sl@0: // Change log: sl@0: // 3 Jan 03 WEKEMPF Modified for DLL implementation. sl@0: