MACE
1.0.0
|
00001 #ifndef _MACE_RPC_JSON_ERRORS_HPP_ 00002 #define _MACE_RPC_JSON_ERRORS_HPP_ 00003 #include <boost/exception/all.hpp> 00004 #include <boost/throw_exception.hpp> 00005 00006 namespace mace { namespace rpc { namespace json { 00007 struct parse_error : public virtual boost::exception, public virtual std::exception { 00008 const char* what()const throw() { return "json_parse_error"; } 00009 virtual void rethrow()const { BOOST_THROW_EXCEPTION(*this); } 00010 }; 00011 00012 struct error_code { 00013 enum codes { 00014 parse_error = -32700, 00015 invalid_request = -32600, 00016 method_not_found = -32601, 00017 invalid_params = -32602, 00018 internal_error = -32603, 00019 server_error = -32000 00020 }; 00021 }; 00022 00023 } } } // namespace mace::rpc::json 00024 00025 #endif // _MACE_RPC_JSON_ERRORS_HPP_