You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2008/01/18 18:26:04 UTC

svn commit: r613208 - in /logging/log4cxx/trunk/src/main/cpp: gzcompressaction.cpp zipcompressaction.cpp

Author: carnold
Date: Fri Jan 18 09:25:43 2008
New Revision: 613208

URL: http://svn.apache.org/viewvc?rev=613208&view=rev
Log:
LOGCXX-200: Do not throw exception if stderr not available

Modified:
    logging/log4cxx/trunk/src/main/cpp/gzcompressaction.cpp
    logging/log4cxx/trunk/src/main/cpp/zipcompressaction.cpp

Modified: logging/log4cxx/trunk/src/main/cpp/gzcompressaction.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/gzcompressaction.cpp?rev=613208&r1=613207&r2=613208&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/gzcompressaction.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/gzcompressaction.cpp Fri Jan 18 09:25:43 2008
@@ -63,9 +63,10 @@
         //
         apr_file_t* child_err;
         stat = apr_file_open_stderr(&child_err, pool);
-        if (stat != APR_SUCCESS) throw IOException(stat);
-        stat =  apr_procattr_child_err_set(attr, child_err, NULL);
-        if (stat != APR_SUCCESS) throw IOException(stat);
+        if (stat == APR_SUCCESS) {
+        	stat =  apr_procattr_child_err_set(attr, child_err, NULL);
+        	if (stat != APR_SUCCESS) throw IOException(stat);
+        }
 
         const char** args = (const char**) 
             apr_palloc(pool, 4 *sizeof(*args));

Modified: logging/log4cxx/trunk/src/main/cpp/zipcompressaction.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/zipcompressaction.cpp?rev=613208&r1=613207&r2=613208&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/zipcompressaction.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/zipcompressaction.cpp Fri Jan 18 09:25:43 2008
@@ -51,9 +51,10 @@
         //
         apr_file_t* child_err;
         stat = apr_file_open_stderr(&child_err, pool);
-        if (stat != APR_SUCCESS) throw IOException(stat);
-        stat =  apr_procattr_child_err_set(attr, child_err, NULL);
-        if (stat != APR_SUCCESS) throw IOException(stat);
+        if (stat == APR_SUCCESS) {
+        	stat =  apr_procattr_child_err_set(attr, child_err, NULL);
+        	if (stat != APR_SUCCESS) throw IOException(stat);
+        }
 
         const char** args = (const char**) 
             apr_palloc(pool, 5 *sizeof(*args));