throw more describing exception when repo probing failed (bnc #389690)
authorJosef Reidinger <jreidinger@suse.cz>
Fri, 16 May 2008 07:59:58 +0000 (07:59 +0000)
committerJosef Reidinger <jreidinger@suse.cz>
Fri, 16 May 2008 07:59:58 +0000 (07:59 +0000)
zypp/RepoManager.cc
zypp/repo/RepoException.cc
zypp/repo/RepoException.h

index d39dc30..427e5d7 100644 (file)
@@ -520,7 +520,7 @@ namespace zypp
       }
       else
       {
-        ZYPP_THROW(RepoUnknownTypeException());
+        ZYPP_THROW(RepoUnknownTypeException(info));
       }
     }
     catch ( const Exception &e )
index 5eb845b..945620d 100644 (file)
@@ -12,6 +12,7 @@
 #include <iostream>
 //#include "zypp/base/Logger.h"
 #include "zypp/repo/RepoException.h"
+#include "zypp/base/String.h"
 
 using std::endl;
 
@@ -48,6 +49,11 @@ namespace zypp
     : RepoException( info, msg_r )
     {}
 
+    RepoUnknownTypeException::RepoUnknownTypeException( const RepoInfo &info)
+    : RepoException( info,
+        str::form("Cannot determine type for repository %s.",info.alias().c_str()))
+    {}
+
 
     std::ostream & RepoException::dumpOn( std::ostream & str ) const
     {
index 21f0574..d6afbc9 100644 (file)
@@ -133,6 +133,8 @@ namespace zypp
         : RepoException(msg_r)
       {}
 
+      RepoUnknownTypeException( const RepoInfo &info );
+
       RepoUnknownTypeException()
       {}