xml_archive_exception.hpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef BOOST_ARCHIVE_XML_ARCHIVE_EXCEPTION_HPP
  2. #define BOOST_ARCHIVE_XML_ARCHIVE_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_archive_exception.hpp:
  9. // (C) Copyright 2007 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 <exception>
  15. #include <boost/assert.hpp>
  16. #include <boost/config.hpp>
  17. #include <boost/archive/detail/decl.hpp>
  18. #include <boost/archive/archive_exception.hpp>
  19. #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
  20. namespace boost {
  21. namespace archive {
  22. //////////////////////////////////////////////////////////////////////
  23. // exceptions thrown by xml archives
  24. //
  25. class BOOST_SYMBOL_VISIBLE xml_archive_exception :
  26. public virtual boost::archive::archive_exception
  27. {
  28. public:
  29. typedef enum {
  30. xml_archive_parsing_error, // see save_register
  31. xml_archive_tag_mismatch,
  32. xml_archive_tag_name_error
  33. } exception_code;
  34. BOOST_ARCHIVE_DECL xml_archive_exception(
  35. exception_code c,
  36. const char * e1 = NULL,
  37. const char * e2 = NULL
  38. );
  39. BOOST_ARCHIVE_DECL xml_archive_exception(xml_archive_exception const &) ;
  40. virtual BOOST_ARCHIVE_DECL ~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ;
  41. };
  42. }// namespace archive
  43. }// namespace boost
  44. #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
  45. #endif //BOOST_XML_ARCHIVE_ARCHIVE_EXCEPTION_HPP