From 8b1cbfac2f59e8fb4c4bc2ead574a198fe74eff2 Mon Sep 17 00:00:00 2001
From: John Romein <romein@astron.nl>
Date: Wed, 6 Feb 2008 16:03:57 +0000
Subject: [PATCH] bug 225: print ex.what() to std::cerr as well.

---
 CEP/tinyCEP/src/ApplicationHolderController.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CEP/tinyCEP/src/ApplicationHolderController.cc b/CEP/tinyCEP/src/ApplicationHolderController.cc
index 9215829a7fa..0a3c61a2cc5 100644
--- a/CEP/tinyCEP/src/ApplicationHolderController.cc
+++ b/CEP/tinyCEP/src/ApplicationHolderController.cc
@@ -61,6 +61,7 @@ tribool ApplicationHolderController::define   ()
     itsAH.baseDefine();
   } catch (Exception&	ex) {
     LOG_WARN_STR("Exception during define: " << ex.what());
+    std::cerr << "Exception during define: " << ex.what() << std::endl;
     return false;
   }
   return true;
@@ -73,6 +74,7 @@ tribool ApplicationHolderController::init     ()
     itsAH.basePrerun();
   } catch (Exception&	ex) {
     LOG_WARN_STR("Exception during init: " << ex.what());
+    std::cerr << "Exception during init: " << ex.what() << std::endl;
     return false;
   }
   return true;
@@ -87,6 +89,7 @@ tribool ApplicationHolderController::run      ()
     itsIsRunning = true;
   } catch (Exception&	ex) {
     LOG_WARN_STR("Exception during run: " << ex.what());
+    std::cerr << "Exception during run: " << ex.what() << std::endl;
     return false;
   }
   return true;
@@ -112,6 +115,7 @@ tribool ApplicationHolderController::quit  	 ()
     itsAH.baseQuit();
   } catch (Exception&	ex) {
     LOG_WARN_STR("Exception during quit: " << ex.what());
+    std::cerr << "Exception during quit: " << ex.what() << std::endl;
     return false;
   }
   LOG_TRACE_FLOW("Quit ready");
@@ -144,6 +148,7 @@ tribool ApplicationHolderController::reinit	 (const string&	)
     itsAH.basePrerun();
   } catch (Exception&	ex) {
     LOG_WARN_STR("Exception during reinit: " << ex.what());
+    std::cerr << "Exception during reinit: " << ex.what() << std::endl;
     return false;
   }
   return true;
@@ -224,6 +229,7 @@ int ApplicationHolderController::main (int& argc, char**& argv) {
   catch (Exception&	ex) {
     LOG_FATAL_STR("Caught exception: " << ex << endl);
     LOG_FATAL_STR(argv[0] << " terminated by exception!");
+    std::cerr << "Caught exception: " << ex.what() << std::endl;
     return(1);
   }
   
-- 
GitLab