xml_unescape_exception.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP
  2. #define BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER)
  5. # pragma once
  6. #endif
  7. /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
  8. // xml_unescape_exception.hpp:
  9. // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
  10. // Use, modification and distribution is subject to the Boost Software
  11. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  12. // http://www.boost.org/LICENSE_1_0.txt)
  13. // See http://www.boost.org for updates, documentation, and revision history.
  14. #include <boost/config.hpp>
  15. #ifndef BOOST_NO_EXCEPTIONS
  16. #include <exception>
  17. #include <boost/assert.hpp>
  18. namespace boost {
  19. namespace archive {
  20. namespace iterators {
  21. //////////////////////////////////////////////////////////////////////
  22. // exceptions thrown by xml_unescapes
  23. //
  24. class xml_unescape_exception : public std::exception
  25. {
  26. public:
  27. xml_unescape_exception()
  28. {}
  29. virtual const char *what( ) const throw( )
  30. {
  31. return "xml contained un-recognized escape code";
  32. }
  33. };
  34. } // namespace iterators
  35. } // namespace archive
  36. } // namespace boost
  37. #endif //BOOST_NO_EXCEPTIONS
  38. #endif //BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP