try/catch around cap parser
authorKlaus Kaempf <kkaempf@suse.de>
Thu, 9 Feb 2006 17:57:40 +0000 (17:57 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Thu, 9 Feb 2006 17:57:40 +0000 (17:57 +0000)
zypp/source/susetags/PackagesParser.cc

index 09da042..100a5f7 100644 (file)
@@ -51,7 +51,7 @@ namespace zypp
         {
           if ( pkgPending() )
             {
-              result[nvrad] = pkgImpl;
+              result.insert(PkgContent::value_type( nvrad, pkgImpl ) );
             }
           pkgImpl = nextPkg_r;
         }
@@ -66,7 +66,12 @@ namespace zypp
           for ( std::list<std::string>::const_iterator it = depstr_r.begin();
                 it != depstr_r.end(); ++it )
             {
-              capset.insert( CapFactory().parse( ResTraits<Package>::kind, *it ) );
+             try {
+                capset.insert( CapFactory().parse( ResTraits<Package>::kind, *it ) );
+             }
+             catch (Exception & excpt_r) {
+               ZYPP_CAUGHT(excpt_r);
+             }
             }
         }