diff irccd-test/main.cpp @ 729:e08bfc940c54

Core: remove string_util::sprintf
author David Demelier <markand@malikania.fr>
date Wed, 18 Jul 2018 13:09:22 +0200
parents 2007a37d7e1a
children fe3d80412701
line wrap: on
line diff
--- a/irccd-test/main.cpp	Tue Jul 17 23:45:00 2018 +0200
+++ b/irccd-test/main.cpp	Wed Jul 18 13:09:22 2018 +0200
@@ -26,6 +26,7 @@
 
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/filesystem.hpp>
+#include <boost/format.hpp>
 
 #if defined(IRCCD_HAVE_LIBEDIT)
 #   include <histedit.h>
@@ -46,6 +47,9 @@
 #   include <irccd/js/js_plugin.hpp>
 #endif
 
+using boost::format;
+using boost::str;
+
 namespace irccd {
 
 namespace su = string_util;
@@ -607,7 +611,7 @@
         try {
             daemon->set_config(it->second);
         } catch (const std::exception& ex) {
-            throw std::runtime_error(su::sprintf("%s: %s", it->second, ex.what()));
+            throw std::runtime_error(str(format("%1%: %2%") % it->second % ex.what()));
         }
     }
 }