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 #if !defined(SPIRIT_EXPECTATION_FAILURE_JULY_19_2016) 8 #define SPIRIT_EXPECTATION_FAILURE_JULY_19_2016 9 10 #if defined(_MSC_VER) 11 #pragma once 12 #endif 13 14 #include <boost/spirit/home/support/info.hpp> 15 16 #include <stdexcept> 17 18 namespace boost { namespace spirit { namespace qi { 19 template <typename Iterator> 20 struct expectation_failure : std::runtime_error 21 { expectation_failureboost::spirit::qi::expectation_failure22 expectation_failure(Iterator first_, Iterator last_, info const& what) 23 : std::runtime_error("boost::spirit::qi::expectation_failure") 24 , first(first_), last(last_), what_(what) 25 {} ~expectation_failureboost::spirit::qi::expectation_failure26 ~expectation_failure() throw() {} 27 28 Iterator first; 29 Iterator last; 30 info what_; 31 }; 32 }}} 33 34 #endif 35