Fix exception handling when unmounting iso images (bnc #517856)
authorMichael Andres <ma@suse.de>
Fri, 3 Jul 2009 07:30:00 +0000 (09:30 +0200)
committerMichael Andres <ma@suse.de>
Fri, 3 Jul 2009 07:30:00 +0000 (09:30 +0200)
zypp/media/MediaISO.cc

index 3fee74f..8193795 100644 (file)
@@ -299,8 +299,18 @@ namespace zypp
 
       if( _parentId)
       {
+        // Unmounting the iso already succeeded,
+        // so don't let exceptions escape.
         MediaManager manager;
-        manager.release(_parentId);
+        try
+        {
+          manager.release(_parentId);
+        }
+        catch ( const Exception & excpt_r )
+        {
+          ZYPP_CAUGHT( excpt_r );
+          WAR << "Not been able to cleanup the parent mount." << endl;
+        }
       }
       // else:
       // the media manager has reset the _parentId