1 #ifndef BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP
2 #define BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // dataflow_exception.hpp:
12 // (C) Copyright 2002 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)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 #include <boost/config.hpp>
20 #ifndef BOOST_NO_EXCEPTIONS
22 #endif //BOOST_NO_EXCEPTIONS
24 #include <boost/assert.hpp>
30 //////////////////////////////////////////////////////////////////////
31 // exceptions thrown by dataflows
33 class dataflow_exception : public std::exception
38 invalid_base64_character,
39 invalid_xml_escape_sequence,
40 comparison_not_permitted,
46 dataflow_exception(exception_code c = other_exception) : code(c)
49 virtual const char *what( ) const throw( )
51 const char *msg = "unknown exception code";
53 case invalid_6_bitcode:
54 msg = "attempt to encode a value > 6 bits";
56 case invalid_base64_character:
57 msg = "attempt to decode a value not in base64 char set";
59 case invalid_xml_escape_sequence:
60 msg = "invalid xml escape_sequence";
62 case comparison_not_permitted:
63 msg = "cannot invoke iterator comparison now";
65 case invalid_conversion:
66 msg = "invalid multbyte/wide char conversion";
76 } // namespace iterators
77 } // namespace archive
80 #endif //BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP