- more accurate exception message (bnc #381845)
authorJan Kupec <jkupec@suse.cz>
Mon, 21 Apr 2008 12:39:28 +0000 (12:39 +0000)
committerJan Kupec <jkupec@suse.cz>
Mon, 21 Apr 2008 12:39:28 +0000 (12:39 +0000)
- should the message be translated?

zypp/target/TargetImpl.cc

index 77cb04e..ceba8fa 100644 (file)
@@ -345,6 +345,13 @@ namespace zypp
 
         filesystem::TmpFile tmpsolv( cachePath /*dir*/,
                                      sat::Pool::instance().systemRepoName() /* prefix */ );
+        if (!tmpsolv)
+        {
+          Exception ex("Failed to cache rpm database.");
+          ex.remember(str::form(
+              "Cannot create temporary file under %s.", cachePath.asString().c_str()));
+          ZYPP_THROW(ex);
+        }
 
         ostringstream cmd;
         cmd << "rpmdb2solv";