expectation_failure.hpp 1.0 KB

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