libzypp 17.31.23
RepoException.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_REPO_REPOEXCEPTION_H
13#define ZYPP_REPO_REPOEXCEPTION_H
14
15#include <iosfwd>
16#include <string>
17
18#include <zypp/base/Exception.h>
19#include <zypp-core/base/UserRequestException>
20#include <zypp/RepoInfo.h>
21#include <zypp/ServiceInfo.h>
22
24namespace zypp
25{
27 namespace repo
28 {
29
33
37 class RepoException : public Exception
38 {
39 public:
41 RepoException( const std::string & msg_r );
42 RepoException( const RepoInfo & info );
43 RepoException( const RepoInfo & info, const std::string & msg_r );
44 virtual ~RepoException() throw();
45
47 { return _info; }
48
49 std::string alias()
50 { return info().alias(); }
51
52 protected:
53 virtual std::ostream & dumpOn( std::ostream & str ) const;
54
55 private:
57 };
59
66 {
67 public:
69 RepoNotCachedException( const std::string & msg_r );
71 RepoNotCachedException( const RepoInfo & info, const std::string & msg_r );
72 };
73
79 {
80 public:
82 RepoNoUrlException( const std::string & msg_r );
84 RepoNoUrlException( const RepoInfo & info, const std::string & msg_r );
85 };
86
92 {
93 public:
95 RepoNoAliasException( const std::string & msg_r );
97 RepoNoAliasException( const RepoInfo & info, const std::string & msg_r );
98 };
99
104 {
105 public:
107 RepoInvalidAliasException( const std::string & msg_r );
109 RepoInvalidAliasException( const RepoInfo & info, const std::string & msg_r );
110 };
111
117 {
118 public:
120 RepoNotFoundException( const std::string & msg_r );
122 RepoNotFoundException( const RepoInfo & info, const std::string & msg_r );
123 };
124
130 {
131 public:
133 RepoAlreadyExistsException( const std::string & msg_r );
135 RepoAlreadyExistsException( const RepoInfo & info, const std::string & msg_r );
136 };
137
143 {
144 public:
146 RepoUnknownTypeException( const std::string & msg_r );
148 RepoUnknownTypeException( const RepoInfo & info, const std::string & msg_r );
149 };
150
156 {
157 public:
159 RepoMetadataException( const std::string & msg_r );
161 RepoMetadataException( const RepoInfo & info, const std::string & msg_r );
162 };
163
165
168
172
176 {
177 public:
179 ServiceException( const std::string & msg_r );
180 ServiceException( const ServiceInfo & service_r );
181 ServiceException( const ServiceInfo & service_r, const std::string & msg_r );
182 virtual ~ServiceException() throw();
183
185 { return _service; }
186
187 std::string alias()
188 { return service().alias(); }
189
190 protected:
191 virtual std::ostream & dumpOn( std::ostream & str ) const;
192
193 private:
195 };
197
201 {
202 public:
204 ServiceNoAliasException( const std::string & msg_r );
206 ServiceNoAliasException( const ServiceInfo & service_r, const std::string & msg_r );
207 };
208
213 {
214 public:
216 ServiceInvalidAliasException( const std::string & msg_r );
218 ServiceInvalidAliasException( const ServiceInfo & info, const std::string & msg_r );
219 };
220
224 {
225 public:
227 ServiceAlreadyExistsException( const std::string & msg_r );
229 ServiceAlreadyExistsException( const ServiceInfo & service_r, const std::string & msg_r );
230 };
231
235 {
236 public:
238 ServiceNoUrlException( const std::string & msg_r );
239 ServiceNoUrlException( const ServiceInfo & service_r );
240 ServiceNoUrlException( const ServiceInfo & service_r, const std::string & msg_r );
241 };
243
244
248
252 {
253 public:
255 ServicePluginException( const std::string & msg_r );
257 ServicePluginException( const ServiceInfo & service_r, const std::string & msg_r );
258 };
259
263 {
264 public:
266 ServicePluginInformalException( const std::string & msg_r );
268 ServicePluginInformalException( const ServiceInfo & service_r, const std::string & msg_r );
269 };
270
274 {
275 public:
277 ServicePluginImmutableException( const std::string & msg_r );
279 ServicePluginImmutableException( const ServiceInfo & service_r, const std::string & msg_r );
280 };
282
284 } // namespace repo
287} // namespace zypp
289#endif // ZYPP_PARSER_TAGFILE_PARSEEXCEPTION_H
Base class for Exception.
Definition: Exception.h:146
What is known about a repository.
Definition: RepoInfo.h:72
Service data.
Definition: ServiceInfo.h:37
Repository already exists and some unique attribute can't be duplicated.
RepoAlreadyExistsException(const RepoInfo &info, const std::string &msg_r)
RepoAlreadyExistsException(const std::string &msg_r)
RepoAlreadyExistsException(const RepoInfo &info)
Exception for repository handling.
Definition: RepoException.h:38
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
std::string alias() const
unique identifier for this source.
Thrown when the repo alias is found to be invalid.
RepoInvalidAliasException(const RepoInfo &info, const std::string &msg_r)
RepoInvalidAliasException(const std::string &msg_r)
RepoInvalidAliasException(const RepoInfo &info)
thrown when it was impossible to use the raw metadata for this repo.
RepoMetadataException(const std::string &msg_r)
RepoMetadataException(const RepoInfo &info, const std::string &msg_r)
RepoMetadataException(const RepoInfo &info)
thrown when it was impossible to determine an alias for this repo.
Definition: RepoException.h:92
RepoNoAliasException(const RepoInfo &info)
RepoNoAliasException(const std::string &msg_r)
RepoNoAliasException(const RepoInfo &info, const std::string &msg_r)
thrown when it was impossible to determine one url for this repo.
Definition: RepoException.h:79
RepoNoUrlException(const RepoInfo &info)
RepoNoUrlException(const RepoInfo &info, const std::string &msg_r)
RepoNoUrlException(const std::string &msg_r)
The repository cache is not built yet so you can't create the repostories from the cache.
Definition: RepoException.h:66
RepoNotCachedException(const std::string &msg_r)
RepoNotCachedException(const RepoInfo &info, const std::string &msg_r)
RepoNotCachedException(const RepoInfo &info)
thrown when it was impossible to match a repository
RepoNotFoundException(const std::string &msg_r)
RepoNotFoundException(const RepoInfo &info, const std::string &msg_r)
RepoNotFoundException(const RepoInfo &info)
thrown when it was impossible to determine this repo type.
RepoUnknownTypeException(const RepoInfo &info)
RepoUnknownTypeException(const std::string &msg_r)
RepoUnknownTypeException(const RepoInfo &info, const std::string &msg_r)
Service already exists and some unique attribute can't be duplicated.
ServiceAlreadyExistsException(const ServiceInfo &service_r, const std::string &msg_r)
ServiceAlreadyExistsException(const ServiceInfo &service_r)
ServiceAlreadyExistsException(const std::string &msg_r)
Base Exception for service handling.
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Thrown when the repo alias is found to be invalid.
ServiceInvalidAliasException(const ServiceInfo &info, const std::string &msg_r)
ServiceInvalidAliasException(const ServiceInfo &info)
ServiceInvalidAliasException(const std::string &msg_r)
Service without alias was used in an operation.
ServiceNoAliasException(const ServiceInfo &service_r, const std::string &msg_r)
ServiceNoAliasException(const ServiceInfo &service_r)
ServiceNoAliasException(const std::string &msg_r)
Service has no or invalid url defined.
ServiceNoUrlException(const std::string &msg_r)
ServiceNoUrlException(const ServiceInfo &service_r, const std::string &msg_r)
ServiceNoUrlException(const ServiceInfo &service_r)
PLUGIN Service related exceptions.
ServicePluginException(const ServiceInfo &service_r, const std::string &msg_r)
ServicePluginException(const ServiceInfo &service_r)
ServicePluginException(const std::string &msg_r)
ServicePluginImmutableException(const ServiceInfo &service_r, const std::string &msg_r)
ServicePluginImmutableException(const ServiceInfo &service_r)
ServicePluginImmutableException(const std::string &msg_r)
Service plugin has trouble providing the metadata but this should not be treated as error.
ServicePluginInformalException(const ServiceInfo &service_r, const std::string &msg_r)
ServicePluginInformalException(const ServiceInfo &service_r)
ServicePluginInformalException(const std::string &msg_r)
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2