felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1220640 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BaseUpdateInstallHelper.java
Date Mon, 19 Dec 2011 08:13:51 GMT
Author: fmeschbe
Date: Mon Dec 19 08:13:51 2011
New Revision: 1220640

URL: http://svn.apache.org/viewvc?rev=1220640&view=rev
Log:
FELIX-3284 Prevent excpetions masking the actual problem if the bundle update fails. Write
to stderr if logging fails

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BaseUpdateInstallHelper.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BaseUpdateInstallHelper.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BaseUpdateInstallHelper.java?rev=1220640&r1=1220639&r2=1220640&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BaseUpdateInstallHelper.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BaseUpdateInstallHelper.java
Mon Dec 19 08:13:51 2011
@@ -129,9 +129,21 @@ abstract class BaseUpdateInstallHelper i
                     { bundle } );
             }
         }
-        catch ( Exception ioe )
+        catch ( Exception e )
         {
-            getLog().log( LogService.LOG_ERROR, "Cannot install or update bundle from " +
bundleFile, ioe );
+            try
+            {
+                getLog().log( LogService.LOG_ERROR, "Cannot install or update bundle from
" + bundleFile, e );
+            }
+            catch ( Exception secondary )
+            {
+                // at the time this exception happens the log used might have
+                // been destroyed and is not available to use any longer. So
+                // we only can write to stderr at this time to at least get
+                // some message out ...
+                System.err.println( "Cannot install or update bundle from " + bundleFile
);
+                e.printStackTrace( System.err );
+            }
         }
         finally
         {



Mime
View raw message