Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / archive / xml_archive_exception.hpp
1 #ifndef BOOST_ARCHIVE_XML_ARCHIVE_EXCEPTION_HPP
2 #define BOOST_ARCHIVE_XML_ARCHIVE_EXCEPTION_HPP
3
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER)
6 # pragma once
7 #endif
8
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // xml_archive_exception.hpp:
11
12 // (C) Copyright 2007 Robert Ramey - http://www.rrsd.com . 
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
16
17 //  See http://www.boost.org for updates, documentation, and revision history.
18
19 #include <exception>
20 #include <boost/assert.hpp>
21
22 #include <boost/config.hpp> 
23 #include <boost/preprocessor/empty.hpp>
24 #include <boost/archive/detail/decl.hpp>
25 #include <boost/archive/archive_exception.hpp>
26
27 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
28
29 namespace boost {
30 namespace archive {
31
32 //////////////////////////////////////////////////////////////////////
33 // exceptions thrown by xml archives
34 //
35 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_archive_exception : 
36     public virtual boost::archive::archive_exception
37 {
38 public:
39     typedef enum {
40         xml_archive_parsing_error,    // see save_register
41         xml_archive_tag_mismatch,
42         xml_archive_tag_name_error
43     } exception_code;
44     xml_archive_exception(
45         exception_code c, 
46         const char * e1 = NULL,
47         const char * e2 = NULL
48     );
49 };
50
51 }// namespace archive
52 }// namespace boost
53
54 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
55
56 #endif //BOOST_XML_ARCHIVE_ARCHIVE_EXCEPTION_HPP