Replace nfd::getExtendedErrorMessage with boost::diagnostic_information
Refs: #4834
Change-Id: I7fc00960d7e5a97748b2277c525a19775810377f
diff --git a/tools/ndn-autoconfig-server/main.cpp b/tools/ndn-autoconfig-server/main.cpp
index 1077a8d..c281148 100644
--- a/tools/ndn-autoconfig-server/main.cpp
+++ b/tools/ndn-autoconfig-server/main.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -24,12 +24,13 @@
*/
#include "program.hpp"
-#include "core/extended-error-message.hpp"
#include "core/version.hpp"
#include <iostream>
#include <unistd.h>
+#include <boost/exception/diagnostic_information.hpp>
+
namespace ndn {
namespace tools {
namespace autoconfig_server {
@@ -42,8 +43,8 @@
<< "Options:\n"
<< " -h - print usage and exit\n"
<< " -V - print version number and exit\n"
- << " -p prefix - a local prefix of the HUB\n"
- << " hub-face - a FaceUri to reach the HUB\n";
+ << " -p prefix - a local prefix of the hub\n"
+ << " hub-face - a FaceUri to reach the hub\n";
}
static int
@@ -75,7 +76,7 @@
}
if (!options.hubFaceUri.parse(argv[::optind])) {
- std::cerr << "ERROR: cannot parse HUB FaceUri" << std::endl;
+ std::cerr << "ERROR: cannot parse hub FaceUri" << std::endl;
return 2;
}
@@ -86,7 +87,7 @@
program.run();
}
catch (const std::exception& e) {
- std::cerr << ::nfd::getExtendedErrorMessage(e) << std::endl;
+ std::cerr << "ERROR: " << boost::diagnostic_information(e);
return 1;
}
return 0;