From cc7a398c28e5b53172471d5d9ab7aa34db15dda1 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Fri, 2 Jan 2009 13:57:28 +0000 Subject: allways write exceptions to log --- src/anytun.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') 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; } } -- cgit v1.2.3