summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2009-01-02 13:57:28 +0000
committerOthmar Gsenger <otti@anytun.org>2009-01-02 13:57:28 +0000
commitcc7a398c28e5b53172471d5d9ab7aa34db15dda1 (patch)
treea22da91e9911195fcfe999d2eba2d5eb7f7a5383 /src/anytun.cpp
parentcatch exception from anytun-showtables if no/wrong input (diff)
allways write exceptions to log
Diffstat (limited to 'src/anytun.cpp')
-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;
}
}