Sprout/sprout/optional/exceptions.hpp

33 lines
951 B
C++
Raw Normal View History

2013-08-08 09:54:33 +00:00
/*=============================================================================
2015-01-10 10:13:57 +00:00
Copyright (c) 2011-2015 Bolero MURAKAMI
2013-08-08 09:54:33 +00:00
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
2013-03-31 01:09:02 +00:00
#ifndef SPROUT_OPTIONAL_EXCEPTIONS_HPP
#define SPROUT_OPTIONAL_EXCEPTIONS_HPP
#include <string>
#include <stdexcept>
#include <sprout/config.hpp>
namespace sprout {
//
// bad_optional_access
//
class bad_optional_access
: public std::logic_error
{
public:
explicit bad_optional_access(std::string const& what_arg)
: std::logic_error(what_arg)
{}
explicit bad_optional_access(char const* what_arg)
: std::logic_error(what_arg)
{}
};
} // namespace sprout
#endif // SPROUT_OPTIONAL_EXCEPTIONS_HPP