1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/parser/tagfile/RepoException.h
12 #ifndef ZYPP_REPO_REPOEXCEPTION_H
13 #define ZYPP_REPO_REPOEXCEPTION_H
18 #include "zypp/base/Exception.h"
19 #include "zypp/base/UserRequestException.h"
20 #include "zypp/RepoInfo.h"
21 ///////////////////////////////////////////////////////////////////
23 { /////////////////////////////////////////////////////////////////
24 ///////////////////////////////////////////////////////////////////
26 { /////////////////////////////////////////////////////////////////
29 * \short Exception for repository handling.
31 class RepoException : public Exception
37 RepoException( const std::string & msg_r );
39 virtual std::ostream & dumpOn( std::ostream & str ) const;
41 ///////////////////////////////////////////////////////////////////
44 * The repository cache is not built yet
45 * so you can't create the repostories from
48 class RepoNotCachedException : public RepoException
51 RepoNotCachedException();
52 RepoNotCachedException( const std::string & msg_r );
56 * thrown when it was impossible to
57 * determine one url for this repo.
59 class RepoNoUrlException : public RepoException
65 RepoNoUrlException( const RepoInfo &info)
69 ~RepoNoUrlException() throw()
79 * thrown when it was impossible to
80 * determine an alias for this repo.
82 class RepoNoAliasException : public RepoException
88 * thrown when it was impossible to
91 class RepoNotFoundException : public RepoException
94 RepoNotFoundException( const RepoInfo &info)
97 ~RepoNotFoundException() throw()
107 * Repository already exists and some unique
108 * attribute can't be duplicated.
110 class RepoAlreadyExistsException : public RepoException
113 ~RepoAlreadyExistsException() throw()
116 RepoAlreadyExistsException( const std::string &alias,
117 const std::string & msg_r )
118 : RepoException(msg_r)
122 RepoAlreadyExistsException( const std::string &alias )
134 * thrown when it was impossible to
135 * determine this repo type.
137 class RepoUnknownTypeException : public RepoException
140 RepoUnknownTypeException( const std::string & msg_r )
141 : RepoException(msg_r)
144 RepoUnknownTypeException()
147 ~RepoUnknownTypeException() throw()
152 * thrown when it was impossible to
153 * use the raw metadata for this repo.
155 class RepoMetadataException : public RepoException
158 RepoMetadataException( const RepoInfo &info)
162 RepoMetadataException()
165 ~RepoMetadataException() throw()
174 /////////////////////////////////////////////////////////////////
175 } // namespace parser
176 ///////////////////////////////////////////////////////////////////
177 /////////////////////////////////////////////////////////////////
179 ///////////////////////////////////////////////////////////////////
180 #endif // ZYPP_PARSER_TAGFILE_PARSEEXCEPTION_H