X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Ft2n_exception.hxx;h=719110106ff502098bb81475b576053962ddc0d4;hp=364a194a5cba93fc681299efc6cd5869aefef9df;hb=d535333ffe637c9e547e68b792f334c229641520;hpb=0cf4dc9bf7fa527751fd7dc425f882fc86888132 diff --git a/src/t2n_exception.hxx b/src/t2n_exception.hxx index 364a194..7191101 100644 --- a/src/t2n_exception.hxx +++ b/src/t2n_exception.hxx @@ -23,12 +23,11 @@ #include #include -#include -// serialization for std::exception namespace boost { namespace serialization { +// make std::exception serializable template void serialize(Archive & ar, std::exception & g, const unsigned int version) { @@ -39,8 +38,7 @@ void serialize(Archive & ar, std::exception & g, const unsigned int version) namespace libt2n { - -// a generic exception that can be handeled with libt2n +/// a generic exception that can be handeled with libt2n class t2n_exception : public std::exception { private: @@ -73,9 +71,8 @@ class t2n_exception : public std::exception virtual void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_exception) -// a (unspecified) problem with libt2n communication +/// a (unspecified) problem with libt2n communication class t2n_communication_error : public t2n_exception { private: @@ -100,9 +97,8 @@ class t2n_communication_error : public t2n_exception void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_communication_error) -// can't connect to libt2n server +/// can't connect to libt2n server class t2n_connect_error : public t2n_communication_error { private: @@ -127,9 +123,8 @@ class t2n_connect_error : public t2n_communication_error void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_connect_error) -// error establishing a socket on the server (only thrown on the server-side) +/// error establishing a socket on the server (only thrown on the server-side) class t2n_server_error : public t2n_communication_error { private: @@ -154,9 +149,8 @@ class t2n_server_error : public t2n_communication_error void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_server_error) -// error transmitting or receiving libt2n messages +/// error transmitting or receiving libt2n messages class t2n_transfer_error : public t2n_communication_error { private: @@ -181,9 +175,8 @@ class t2n_transfer_error : public t2n_communication_error void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_transfer_error) -// tried to talk to an incompatible libt2n version +/// tried to talk to an incompatible libt2n version class t2n_version_mismatch : public t2n_communication_error { private: @@ -208,9 +201,8 @@ class t2n_version_mismatch : public t2n_communication_error void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_version_mismatch) -// illegal libt2n command received +/// illegal libt2n command received class t2n_command_error : public t2n_exception { private: @@ -235,9 +227,8 @@ class t2n_command_error : public t2n_exception void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_command_error) -// error serializing or deserializing a libt2n command packet +/// error serializing or deserializing a libt2n command packet class t2n_serialization_error : public t2n_exception { private: @@ -262,10 +253,10 @@ class t2n_serialization_error : public t2n_exception void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_serialization_error) -// a runtime error within the remote function -// derive your own custom exceptions from this one +/** @brief a runtime error within the remote function. + derive your own custom exceptions from this one +*/ class t2n_runtime_error : public t2n_exception { private: @@ -290,8 +281,7 @@ class t2n_runtime_error : public t2n_exception void do_throw() { throw *this; } }; -BOOST_CLASS_EXPORT(t2n_runtime_error) -} +} // namespace libt2n #endif