- throw repounknowntype except on string parsing.
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 19 Jun 2007 20:50:43 +0000 (20:50 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 19 Jun 2007 20:50:43 +0000 (20:50 +0000)
zypp/repo/RepoException.h
zypp/repo/RepoType.cc

index 119e565..f4abec3 100644 (file)
@@ -122,7 +122,16 @@ namespace zypp
      */
     class RepoUnknownTypeException : public RepoException
     {
-    
+    public:
+      RepoUnknownTypeException( const std::string & msg_r )
+        : RepoException(msg_r)
+      {}
+
+      RepoUnknownTypeException()
+      {}
+
+      ~RepoUnknownTypeException() throw()
+      {}
     };
     
     /////////////////////////////////////////////////////////////////
index 1861dba..e418571 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <iostream>
 #include <map>
-#include "zypp/base/Exception.h"
+#include "zypp/repo/RepoException.h"
 #include "RepoType.h"
 
 namespace zypp
@@ -46,8 +46,8 @@ namespace repo
       = _table.find(strval_r);
     if (it == _table.end())
     {
-      ZYPP_THROW(Exception(
-        "RepoType parse: illegal string value '" + strval_r + "'"));
+      ZYPP_THROW(RepoUnknownTypeException(
+        "Unknown repository type '" + strval_r + "'"));
     }
     return it->second;
   }