1 /*============================================================================= 2 Copyright (c) 2001-2011 Joel de Guzman 3 4 Distributed under the Boost Software License, Version 1.0. (See accompanying 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 =============================================================================*/ 7 #ifndef BOOST_SPIRIT_QI_DETAIL_EXPECTATION_FAILURE_HPP 8 #define BOOST_SPIRIT_QI_DETAIL_EXPECTATION_FAILURE_HPP 9 10 #if defined(_MSC_VER) 11 #pragma once 12 #endif 13 14 #include <boost/spirit/home/support/info.hpp> 15 16 #include <boost/config.hpp> // for BOOST_SYMBOL_VISIBLE 17 #include <stdexcept> 18 19 namespace boost { namespace spirit { namespace qi { 20 template <typename Iterator> 21 struct BOOST_SYMBOL_VISIBLE expectation_failure : std::runtime_error 22 { expectation_failureboost::spirit::qi::expectation_failure23 expectation_failure(Iterator first_, Iterator last_, info const& what) 24 : std::runtime_error("boost::spirit::qi::expectation_failure") 25 , first(first_), last(last_), what_(what) 26 {} ~expectation_failureboost::spirit::qi::expectation_failure27 ~expectation_failure() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {} 28 29 Iterator first; 30 Iterator last; 31 info what_; 32 }; 33 }}} 34 35 #endif 36