os/ossrv/ossrv_pub/boost_apis/boost/thread/exceptions.hpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (C) 2001-2003
sl@0
     2
// William E. Kempf
sl@0
     3
//
sl@0
     4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
sl@0
     5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
sl@0
     6
sl@0
     7
#ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H
sl@0
     8
#define BOOST_THREAD_EXCEPTIONS_PDM070801_H
sl@0
     9
sl@0
    10
#include <boost/thread/detail/config.hpp>
sl@0
    11
sl@0
    12
//  pdm: Sorry, but this class is used all over the place & I end up
sl@0
    13
//       with recursive headers if I don't separate it
sl@0
    14
//  wek: Not sure why recursive headers would cause compilation problems
sl@0
    15
//       given the include guards, but regardless it makes sense to
sl@0
    16
//       seperate this out any way.
sl@0
    17
sl@0
    18
#include <string>
sl@0
    19
#include <stdexcept>
sl@0
    20
sl@0
    21
namespace boost {
sl@0
    22
sl@0
    23
class BOOST_THREAD_DECL thread_exception : public std::exception
sl@0
    24
{
sl@0
    25
protected:
sl@0
    26
    thread_exception();
sl@0
    27
    thread_exception(int sys_err_code);
sl@0
    28
sl@0
    29
public:
sl@0
    30
    ~thread_exception() throw();
sl@0
    31
sl@0
    32
    int native_error() const;
sl@0
    33
sl@0
    34
private:
sl@0
    35
    int m_sys_err;
sl@0
    36
};
sl@0
    37
sl@0
    38
class BOOST_THREAD_DECL lock_error : public thread_exception
sl@0
    39
{
sl@0
    40
public:
sl@0
    41
    lock_error();
sl@0
    42
    lock_error(int sys_err_code);
sl@0
    43
    ~lock_error() throw();
sl@0
    44
sl@0
    45
    virtual const char* what() const throw();
sl@0
    46
};
sl@0
    47
sl@0
    48
class BOOST_THREAD_DECL thread_resource_error : public thread_exception
sl@0
    49
{
sl@0
    50
public:
sl@0
    51
    thread_resource_error();
sl@0
    52
    thread_resource_error(int sys_err_code);
sl@0
    53
    ~thread_resource_error() throw();
sl@0
    54
sl@0
    55
    virtual const char* what() const throw();
sl@0
    56
};
sl@0
    57
sl@0
    58
class BOOST_THREAD_DECL unsupported_thread_option : public thread_exception
sl@0
    59
{
sl@0
    60
public:
sl@0
    61
    unsupported_thread_option();
sl@0
    62
    unsupported_thread_option(int sys_err_code);
sl@0
    63
    ~unsupported_thread_option() throw();
sl@0
    64
sl@0
    65
    virtual const char* what() const throw();
sl@0
    66
};
sl@0
    67
sl@0
    68
class BOOST_THREAD_DECL invalid_thread_argument : public thread_exception
sl@0
    69
{
sl@0
    70
public:
sl@0
    71
    invalid_thread_argument();
sl@0
    72
    invalid_thread_argument(int sys_err_code);
sl@0
    73
    ~invalid_thread_argument() throw();
sl@0
    74
sl@0
    75
    virtual const char* what() const throw();
sl@0
    76
};
sl@0
    77
sl@0
    78
class BOOST_THREAD_DECL thread_permission_error : public thread_exception
sl@0
    79
{
sl@0
    80
public:
sl@0
    81
    thread_permission_error();
sl@0
    82
    thread_permission_error(int sys_err_code);
sl@0
    83
    ~thread_permission_error() throw();
sl@0
    84
sl@0
    85
    virtual const char* what() const throw();
sl@0
    86
};
sl@0
    87
sl@0
    88
} // namespace boost
sl@0
    89
sl@0
    90
#endif // BOOST_THREAD_CONFIG_PDM070801_H
sl@0
    91
sl@0
    92
// Change log:
sl@0
    93
//    3 Jan 03  WEKEMPF Modified for DLL implementation.
sl@0
    94