summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/anytun.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index 426c500..e995fa8 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -514,16 +514,14 @@ int main(int argc, char* argv[])
}
catch(std::runtime_error& e)
{
- if(daemonized)
- cLog.msg(Log::PRIO_ERR) << "uncaught runtime error, exiting: " << e.what();
- else
+ cLog.msg(Log::PRIO_ERR) << "uncaught runtime error, exiting: " << e.what();
+ if(!daemonized)
std::cout << "uncaught runtime error, exiting: " << e.what() << std::endl;
}
catch(std::exception& e)
{
- if(daemonized)
- cLog.msg(Log::PRIO_ERR) << "uncaught exception, exiting: " << e.what();
- else
+ cLog.msg(Log::PRIO_ERR) << "uncaught exception, exiting: " << e.what();
+ if(!daemonized)
std::cout << "uncaught exception, exiting: " << e.what() << std::endl;
}
}