You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by cd...@apache.org on 2005/10/04 10:28:13 UTC

svn commit: r293568 - /webservices/axis/trunk/c/src/server/apache2/mod_axis2.cpp

Author: cdinapala
Date: Tue Oct  4 01:28:05 2005
New Revision: 293568

URL: http://svn.apache.org/viewcvs?rev=293568&view=rev
Log:
Made the changes to captured errors being written to Apache's access.log as solution to issue 731.

Modified:
    webservices/axis/trunk/c/src/server/apache2/mod_axis2.cpp

Modified: webservices/axis/trunk/c/src/server/apache2/mod_axis2.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/server/apache2/mod_axis2.cpp?rev=293568&r1=293567&r2=293568&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/server/apache2/mod_axis2.cpp (original)
+++ webservices/axis/trunk/c/src/server/apache2/mod_axis2.cpp Tue Oct  4 01:28:05 2005
@@ -19,6 +19,8 @@
  */
 
 #include "Apache2Transport.h"
+#include <iostream>
+#include <axis/AxisException.hpp> 
 
 #define xxx ap_log_rerror(APLOG_MARK,APLOG_ERR, globr,"logged here");
 #define yyy ap_log_rerror(APLOG_MARK, APLOG_ERR, globr,"logged here");
@@ -88,13 +90,35 @@
 
 static void module_init(apr_pool_t* p, server_rec* svr_rec)
 {
-    apr_pool_cleanup_register(p, NULL, module_exit, apr_pool_cleanup_null);
-    initialize_module(1);
+   try
+   {
+		apr_pool_cleanup_register(p, NULL, module_exit, apr_pool_cleanup_null);
+		initialize_module(1);
+   }
+   catch(AxisException& e) 
+   {
+		std::cerr << "An error occurred while Axis was initializing: " << e.what() << std::endl;
+   }
+   catch(...) 
+   {
+		std::cerr << "An unkown error occurred while Axis was initializing: " << std::endl;
+   }
 }
 
 static int axis_handler(request_rec* req_rec)
 {
-	return axis_handler_helper(req_rec);
+	try
+	{
+		return axis_handler_helper(req_rec);
+	}
+	catch(AxisException& e) 
+	{
+		std::cerr << "An error occurred while Axis was initializing: " << e.what() << std::endl;
+	}
+	catch(...) 
+	{
+		std::cerr << "An unkown error occurred while Axis was initializing: " << std::endl;
+	}
 }
 
 static void mod_axis_register_hooks(apr_pool_t* p)