d4b12295fe279ccd6d86691d5c2640fc687d7b0e
[libt2n] / src / t2n_exception.tcc
1 /***************************************************************************
2  *   Copyright (C) 2006 by Gerd v. Egidy                                   *
3  *   gve@intra2net.com                                                     *
4  *                                                                         *
5  *   This library is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU Lesser General Public License version   *
7  *   2.1 as published by the Free Software Foundation.                     *
8  *                                                                         *
9  *   This library is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU Lesser General Public License for more details.                   *
13  *                                                                         *
14  *   You should have received a copy of the GNU Lesser General Public      *
15  *   License along with this program; if not, write to the                 *
16  *   Free Software Foundation, Inc.,                                       *
17  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18  ***************************************************************************/
19
20 #include <boost/archive/binary_oarchive.hpp>
21 #include <boost/archive/binary_iarchive.hpp>
22 #include <boost/archive/xml_oarchive.hpp>
23 #include <boost/archive/xml_iarchive.hpp>
24
25 namespace libt2n
26 {
27
28 template<class Archive>
29 void t2n_exception::serialize(Archive & ar, const unsigned int version)
30 {
31     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(exception);
32     ar & BOOST_SERIALIZATION_NVP(message);
33 }
34
35 template<class Archive>
36 void t2n_communication_error::serialize(Archive & ar, const unsigned int version)
37 {
38     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
39 }
40
41 template<class Archive>
42 void t2n_connect_error::serialize(Archive & ar, const unsigned int version)
43 {
44     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_communication_error);
45 }
46
47 template<class Archive>
48 void t2n_server_error::serialize(Archive & ar, const unsigned int version)
49 {
50     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_communication_error);
51 }
52
53 template<class Archive>
54 void t2n_transfer_error::serialize(Archive & ar, const unsigned int version)
55 {
56     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_communication_error);
57 }
58
59 template<class Archive>
60 void t2n_version_mismatch::serialize(Archive & ar, const unsigned int version)
61 {
62     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_communication_error);
63 }
64
65 template<class Archive>
66 void t2n_command_error::serialize(Archive & ar, const unsigned int version)
67 {
68     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
69 }
70
71 template<class Archive>
72 void t2n_serialization_error::serialize(Archive & ar, const unsigned int version)
73 {
74     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
75 }
76
77 template<class Archive>
78 void t2n_runtime_error::serialize(Archive & ar, const unsigned int version)
79 {
80     ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
81 }
82
83 } // namespace libt2n