1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/thread/exceptions.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,94 @@
1.4 +// Copyright (C) 2001-2003
1.5 +// William E. Kempf
1.6 +//
1.7 +// Distributed under the Boost Software License, Version 1.0. (See accompanying
1.8 +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
1.9 +
1.10 +#ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H
1.11 +#define BOOST_THREAD_EXCEPTIONS_PDM070801_H
1.12 +
1.13 +#include <boost/thread/detail/config.hpp>
1.14 +
1.15 +// pdm: Sorry, but this class is used all over the place & I end up
1.16 +// with recursive headers if I don't separate it
1.17 +// wek: Not sure why recursive headers would cause compilation problems
1.18 +// given the include guards, but regardless it makes sense to
1.19 +// seperate this out any way.
1.20 +
1.21 +#include <string>
1.22 +#include <stdexcept>
1.23 +
1.24 +namespace boost {
1.25 +
1.26 +class BOOST_THREAD_DECL thread_exception : public std::exception
1.27 +{
1.28 +protected:
1.29 + thread_exception();
1.30 + thread_exception(int sys_err_code);
1.31 +
1.32 +public:
1.33 + ~thread_exception() throw();
1.34 +
1.35 + int native_error() const;
1.36 +
1.37 +private:
1.38 + int m_sys_err;
1.39 +};
1.40 +
1.41 +class BOOST_THREAD_DECL lock_error : public thread_exception
1.42 +{
1.43 +public:
1.44 + lock_error();
1.45 + lock_error(int sys_err_code);
1.46 + ~lock_error() throw();
1.47 +
1.48 + virtual const char* what() const throw();
1.49 +};
1.50 +
1.51 +class BOOST_THREAD_DECL thread_resource_error : public thread_exception
1.52 +{
1.53 +public:
1.54 + thread_resource_error();
1.55 + thread_resource_error(int sys_err_code);
1.56 + ~thread_resource_error() throw();
1.57 +
1.58 + virtual const char* what() const throw();
1.59 +};
1.60 +
1.61 +class BOOST_THREAD_DECL unsupported_thread_option : public thread_exception
1.62 +{
1.63 +public:
1.64 + unsupported_thread_option();
1.65 + unsupported_thread_option(int sys_err_code);
1.66 + ~unsupported_thread_option() throw();
1.67 +
1.68 + virtual const char* what() const throw();
1.69 +};
1.70 +
1.71 +class BOOST_THREAD_DECL invalid_thread_argument : public thread_exception
1.72 +{
1.73 +public:
1.74 + invalid_thread_argument();
1.75 + invalid_thread_argument(int sys_err_code);
1.76 + ~invalid_thread_argument() throw();
1.77 +
1.78 + virtual const char* what() const throw();
1.79 +};
1.80 +
1.81 +class BOOST_THREAD_DECL thread_permission_error : public thread_exception
1.82 +{
1.83 +public:
1.84 + thread_permission_error();
1.85 + thread_permission_error(int sys_err_code);
1.86 + ~thread_permission_error() throw();
1.87 +
1.88 + virtual const char* what() const throw();
1.89 +};
1.90 +
1.91 +} // namespace boost
1.92 +
1.93 +#endif // BOOST_THREAD_CONFIG_PDM070801_H
1.94 +
1.95 +// Change log:
1.96 +// 3 Jan 03 WEKEMPF Modified for DLL implementation.
1.97 +