diff irccdctl/cli.cpp @ 569:24b79bccc181

Irccd: initial support of error code responses Bring several new types for describing precise errors using: - irccd_error: for general errors including connecting/recv/send, - server_error: server and server_service, - rule_error: rule and rule_service, - plugin_error: plugin and plugin_service. No error string are sent to the client anymore.
author David Demelier <markand@malikania.fr>
date Tue, 28 Nov 2017 13:57:09 +0100
parents 1ef194b6b168
children 27587ff92a64
line wrap: on
line diff
--- a/irccdctl/cli.cpp	Tue Nov 28 12:20:58 2017 +0100
+++ b/irccdctl/cli.cpp	Tue Nov 28 13:57:09 2017 +0100
@@ -19,7 +19,6 @@
 #include <boost/system/system_error.hpp>
 
 #include <irccd/json_util.hpp>
-#include <irccd/network_errc.hpp>
 #include <irccd/options.hpp>
 #include <irccd/string_util.hpp>
 
@@ -37,11 +36,6 @@
         if (code)
             throw boost::system::system_error(code);
 
-        if (message["error"].is_number_integer())
-            throw boost::system::system_error(static_cast<network_errc>(message["error"].template get<int>()));
-        if (message["error"].is_string())
-            throw std::runtime_error(message["error"].template get<std::string>());
-
         auto c = json_util::to_string(message["command"]);
 
         if (c != req["command"].get<std::string>()) {