2 // Copyright Oliver Kowalke 2009.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 #include "boost/coroutine/exceptions.hpp"
10 namespace coroutines
{
12 class coroutine_error_category
: public system::error_category
15 virtual const char* name() const BOOST_NOEXCEPT
16 { return "coroutine"; }
18 virtual std::string
message( int ev
) const
20 switch (BOOST_SCOPED_ENUM_NATIVE(coroutine_errc
)(ev
))
22 case coroutine_errc::no_data
:
23 return std::string("Operation not permitted because coroutine "
24 "has no valid result.");
26 return std::string("unspecified coroutine_errc value\n");
31 system::error_category
const& coroutine_category() BOOST_NOEXCEPT
33 static coroutines::coroutine_error_category cat
;