daemon: display extended exception information in top-level catch
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4912cb
Refs: #2541
diff --git a/daemon/main.cpp b/daemon/main.cpp
index 6646240..a73dd09 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -30,6 +30,7 @@
#include "core/global-io.hpp"
#include "core/logger.hpp"
#include "core/privilege-helper.hpp"
+#include "core/extended-error-message.hpp"
#include <string.h>
@@ -278,12 +279,12 @@
return 3;
}
else {
- NFD_LOG_FATAL(e.what());
+ NFD_LOG_FATAL(getExtendedErrorMessage(e));
return 2;
}
}
catch (const std::exception& e) {
- NFD_LOG_FATAL(e.what());
+ NFD_LOG_FATAL(getExtendedErrorMessage(e));
return 2;
}
catch (const PrivilegeHelper::Error& e) {