try/catch around store access
authorKlaus Kaempf <kkaempf@suse.de>
Sat, 29 Apr 2006 19:54:25 +0000 (19:54 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Sat, 29 Apr 2006 19:54:25 +0000 (19:54 +0000)
testsuite/source/tests/suseparser.cc

index 3c7b503..66c9809 100644 (file)
@@ -92,7 +92,16 @@ int main( int argc, char * argv[] )
       return 1;
     }
 
-    ResStore store = src.resolvables();
+    ResStore store;
+    try {
+       store = src.resolvables();
+    catch( const Exception & excpt_r ) {
+      cerr << "Can't access store" << endl;
+      ZYPP_CAUGHT( excpt_r );
+      return 1;
+    }
+
+
     INT << "Found " << store.size() << " resolvables" << endl;
     int pkgcount = 0;
     int selcount = 0;