libzypp: zypp/repo/RepoException.h Source File

libzypp 17.25.10

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/base/UserRequestException.h>
20 #include <zypp/RepoInfo.h>
21 #include <zypp/ServiceInfo.h>
22
24 namespace zypp
25 {
27 namespace repo
28 {
29
33
37 class RepoException : public Exception
38 {
39 public:
40 RepoException();
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
46 RepoInfo info()
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:
56 RepoInfo _info;
57 };
59
65 class RepoNotCachedException : public RepoException
66 {
67 public:
68 RepoNotCachedException();
69 RepoNotCachedException( const std::string & msg_r );
70 RepoNotCachedException( const RepoInfo & info );
71 RepoNotCachedException( const RepoInfo & info, const std::string & msg_r );
72 };
73
78 class RepoNoUrlException : public RepoException
79 {
80 public:
81 RepoNoUrlException();
82 RepoNoUrlException( const std::string & msg_r );
83 RepoNoUrlException( const RepoInfo & info );
84 RepoNoUrlException( const RepoInfo & info, const std::string & msg_r );
85 };
86
91 class RepoNoAliasException : public RepoException
92 {
93 public:
94 RepoNoAliasException();
95 RepoNoAliasException( const std::string & msg_r );
96 RepoNoAliasException( const RepoInfo & info );
97 RepoNoAliasException( const RepoInfo & info, const std::string & msg_r );
98 };
99
103 class RepoInvalidAliasException : public RepoException
104 {
105 public:
106 RepoInvalidAliasException();
107 RepoInvalidAliasException( const std::string & msg_r );
108 RepoInvalidAliasException( const RepoInfo & info );
109 RepoInvalidAliasException( const RepoInfo & info, const std::string & msg_r );
110 };
111
116 class RepoNotFoundException : public RepoException
117 {
118 public:
119 RepoNotFoundException();
120 RepoNotFoundException( const std::string & msg_r );
121 RepoNotFoundException( const RepoInfo & info );
122 RepoNotFoundException( const RepoInfo & info, const std::string & msg_r );
123 };
124
129 class RepoAlreadyExistsException : public RepoException
130 {
131 public:
132 RepoAlreadyExistsException();
133 RepoAlreadyExistsException( const std::string & msg_r );
134 RepoAlreadyExistsException( const RepoInfo & info );
135 RepoAlreadyExistsException( const RepoInfo & info, const std::string & msg_r );
136 };
137
142 class RepoUnknownTypeException : public RepoException
143 {
144 public:
145 RepoUnknownTypeException();
146 RepoUnknownTypeException( const std::string & msg_r );
147 RepoUnknownTypeException( const RepoInfo & info );
148 RepoUnknownTypeException( const RepoInfo & info, const std::string & msg_r );
149 };
150
155 class RepoMetadataException : public RepoException
156 {
157 public:
158 RepoMetadataException();
159 RepoMetadataException( const std::string & msg_r );
160 RepoMetadataException( const RepoInfo & info );
161 RepoMetadataException( const RepoInfo & info, const std::string & msg_r );
162 };
163
165
168
172
175 class ServiceException : public Exception
176 {
177 public:
178 ServiceException();
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
184 ServiceInfo service()
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:
194 ServiceInfo _service;
195 };
197
200 class ServiceNoAliasException : public ServiceException
201 {
202 public:
203 ServiceNoAliasException();
204 ServiceNoAliasException( const std::string & msg_r );
205 ServiceNoAliasException( const ServiceInfo & service_r );
206 ServiceNoAliasException( const ServiceInfo & service_r, const std::string & msg_r );
207 };
208
212 class ServiceInvalidAliasException : public ServiceException
213 {
214 public:
215 ServiceInvalidAliasException();
216 ServiceInvalidAliasException( const std::string & msg_r );
217 ServiceInvalidAliasException( const ServiceInfo & info );
218 ServiceInvalidAliasException( const ServiceInfo & info, const std::string & msg_r );
219 };
220
223 class ServiceAlreadyExistsException : public ServiceException
224 {
225 public:
226 ServiceAlreadyExistsException();
227 ServiceAlreadyExistsException( const std::string & msg_r );
228 ServiceAlreadyExistsException( const ServiceInfo & service_r );
229 ServiceAlreadyExistsException( const ServiceInfo & service_r, const std::string & msg_r );
230 };
231
234 class ServiceNoUrlException : public ServiceException
235 {
236 public:
237 ServiceNoUrlException();
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
251 class ServicePluginException : public ServiceException
252 {
253 public:
254 ServicePluginException();
255 ServicePluginException( const std::string & msg_r );
256 ServicePluginException( const ServiceInfo & service_r );
257 ServicePluginException( const ServiceInfo & service_r, const std::string & msg_r );
258 };
259
262 class ServicePluginInformalException : public ServicePluginException
263 {
264 public:
265 ServicePluginInformalException();
266 ServicePluginInformalException( const std::string & msg_r );
267 ServicePluginInformalException( const ServiceInfo & service_r );
268 ServicePluginInformalException( const ServiceInfo & service_r, const std::string & msg_r );
269 };
270
273 class ServicePluginImmutableException : public ServicePluginException
274 {
275 public:
276 ServicePluginImmutableException();
277 ServicePluginImmutableException( const std::string & msg_r );
278 ServicePluginImmutableException( const ServiceInfo & service_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
Exception.h
RepoInfo.h
ServiceInfo.h
UserRequestException.h
zypp::Exception
Base class for Exception.
Definition: Exception.h:146
zypp::RepoInfo
What is known about a repository.
Definition: RepoInfo.h:72
zypp::ServiceInfo
Service data.
Definition: ServiceInfo.h:37
zypp::repo::RepoAlreadyExistsException
Repository already exists and some unique attribute can't be duplicated.
Definition: RepoException.h:130
zypp::repo::RepoAlreadyExistsException::RepoAlreadyExistsException
RepoAlreadyExistsException(const RepoInfo &info, const std::string &msg_r)
zypp::repo::RepoAlreadyExistsException::RepoAlreadyExistsException
RepoAlreadyExistsException(const std::string &msg_r)
zypp::repo::RepoAlreadyExistsException::RepoAlreadyExistsException
RepoAlreadyExistsException()
zypp::repo::RepoAlreadyExistsException::RepoAlreadyExistsException
RepoAlreadyExistsException(const RepoInfo &info)
zypp::repo::RepoException
Exception for repository handling.
Definition: RepoException.h:38
zypp::repo::RepoException::info
RepoInfo info()
Definition: RepoException.h:46
zypp::repo::RepoException::~RepoException
virtual ~RepoException()
Definition: RepoException.cc:48
zypp::repo::RepoException::RepoException
RepoException()
Definition: RepoException.cc:32
zypp::repo::RepoException::dumpOn
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RepoException.cc:51
zypp::repo::RepoException::_info
RepoInfo _info
Definition: RepoException.h:56
zypp::repo::RepoException::alias
std::string alias()
Definition: RepoException.h:49
zypp::repo::RepoInfoBase::alias
std::string alias() const
unique identifier for this source.
Definition: RepoInfoBase.cc:111
zypp::repo::RepoInvalidAliasException
Thrown when the repo alias is found to be invalid.
Definition: RepoException.h:104
zypp::repo::RepoInvalidAliasException::RepoInvalidAliasException
RepoInvalidAliasException()
zypp::repo::RepoInvalidAliasException::RepoInvalidAliasException
RepoInvalidAliasException(const RepoInfo &info, const std::string &msg_r)
zypp::repo::RepoInvalidAliasException::RepoInvalidAliasException
RepoInvalidAliasException(const std::string &msg_r)
zypp::repo::RepoInvalidAliasException::RepoInvalidAliasException
RepoInvalidAliasException(const RepoInfo &info)
zypp::repo::RepoMetadataException
thrown when it was impossible to use the raw metadata for this repo.
Definition: RepoException.h:156
zypp::repo::RepoMetadataException::RepoMetadataException
RepoMetadataException()
zypp::repo::RepoMetadataException::RepoMetadataException
RepoMetadataException(const std::string &msg_r)
zypp::repo::RepoMetadataException::RepoMetadataException
RepoMetadataException(const RepoInfo &info, const std::string &msg_r)
zypp::repo::RepoMetadataException::RepoMetadataException
RepoMetadataException(const RepoInfo &info)
zypp::repo::RepoNoAliasException
thrown when it was impossible to determine an alias for this repo.
Definition: RepoException.h:92
zypp::repo::RepoNoAliasException::RepoNoAliasException
RepoNoAliasException(const RepoInfo &info)
zypp::repo::RepoNoAliasException::RepoNoAliasException
RepoNoAliasException()
zypp::repo::RepoNoAliasException::RepoNoAliasException
RepoNoAliasException(const std::string &msg_r)
zypp::repo::RepoNoAliasException::RepoNoAliasException
RepoNoAliasException(const RepoInfo &info, const std::string &msg_r)
zypp::repo::RepoNoUrlException
thrown when it was impossible to determine one url for this repo.
Definition: RepoException.h:79
zypp::repo::RepoNoUrlException::RepoNoUrlException
RepoNoUrlException(const RepoInfo &info)
zypp::repo::RepoNoUrlException::RepoNoUrlException
RepoNoUrlException(const RepoInfo &info, const std::string &msg_r)
zypp::repo::RepoNoUrlException::RepoNoUrlException
RepoNoUrlException(const std::string &msg_r)
zypp::repo::RepoNoUrlException::RepoNoUrlException
RepoNoUrlException()
zypp::repo::RepoNotCachedException
The repository cache is not built yet so you can't create the repostories from the cache.
Definition: RepoException.h:66
zypp::repo::RepoNotCachedException::RepoNotCachedException
RepoNotCachedException(const std::string &msg_r)
zypp::repo::RepoNotCachedException::RepoNotCachedException
RepoNotCachedException()
zypp::repo::RepoNotCachedException::RepoNotCachedException
RepoNotCachedException(const RepoInfo &info, const std::string &msg_r)
zypp::repo::RepoNotCachedException::RepoNotCachedException
RepoNotCachedException(const RepoInfo &info)
zypp::repo::RepoNotFoundException
thrown when it was impossible to match a repository
Definition: RepoException.h:117
zypp::repo::RepoNotFoundException::RepoNotFoundException
RepoNotFoundException(const std::string &msg_r)
zypp::repo::RepoNotFoundException::RepoNotFoundException
RepoNotFoundException()
zypp::repo::RepoNotFoundException::RepoNotFoundException
RepoNotFoundException(const RepoInfo &info, const std::string &msg_r)
zypp::repo::RepoNotFoundException::RepoNotFoundException
RepoNotFoundException(const RepoInfo &info)
zypp::repo::RepoUnknownTypeException
thrown when it was impossible to determine this repo type.
Definition: RepoException.h:143
zypp::repo::RepoUnknownTypeException::RepoUnknownTypeException
RepoUnknownTypeException(const RepoInfo &info)
zypp::repo::RepoUnknownTypeException::RepoUnknownTypeException
RepoUnknownTypeException()
zypp::repo::RepoUnknownTypeException::RepoUnknownTypeException
RepoUnknownTypeException(const std::string &msg_r)
zypp::repo::RepoUnknownTypeException::RepoUnknownTypeException
RepoUnknownTypeException(const RepoInfo &info, const std::string &msg_r)
zypp::repo::ServiceAlreadyExistsException
Service already exists and some unique attribute can't be duplicated.
Definition: RepoException.h:224
zypp::repo::ServiceAlreadyExistsException::ServiceAlreadyExistsException
ServiceAlreadyExistsException(const ServiceInfo &service_r, const std::string &msg_r)
zypp::repo::ServiceAlreadyExistsException::ServiceAlreadyExistsException
ServiceAlreadyExistsException(const ServiceInfo &service_r)
zypp::repo::ServiceAlreadyExistsException::ServiceAlreadyExistsException
ServiceAlreadyExistsException(const std::string &msg_r)
zypp::repo::ServiceAlreadyExistsException::ServiceAlreadyExistsException
ServiceAlreadyExistsException()
zypp::repo::ServiceException
Base Exception for service handling.
Definition: RepoException.h:176
zypp::repo::ServiceException::_service
ServiceInfo _service
Definition: RepoException.h:194
zypp::repo::ServiceException::dumpOn
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RepoException.cc:101
zypp::repo::ServiceException::~ServiceException
virtual ~ServiceException()
Definition: RepoException.cc:98
zypp::repo::ServiceException::service
ServiceInfo service()
Definition: RepoException.h:184
zypp::repo::ServiceException::alias
std::string alias()
Definition: RepoException.h:187
zypp::repo::ServiceException::ServiceException
ServiceException()
Definition: RepoException.cc:82
zypp::repo::ServiceInvalidAliasException
Thrown when the repo alias is found to be invalid.
Definition: RepoException.h:213
zypp::repo::ServiceInvalidAliasException::ServiceInvalidAliasException
ServiceInvalidAliasException(const ServiceInfo &info, const std::string &msg_r)
zypp::repo::ServiceInvalidAliasException::ServiceInvalidAliasException
ServiceInvalidAliasException()
zypp::repo::ServiceInvalidAliasException::ServiceInvalidAliasException
ServiceInvalidAliasException(const ServiceInfo &info)
zypp::repo::ServiceInvalidAliasException::ServiceInvalidAliasException
ServiceInvalidAliasException(const std::string &msg_r)
zypp::repo::ServiceNoAliasException
Service without alias was used in an operation.
Definition: RepoException.h:201
zypp::repo::ServiceNoAliasException::ServiceNoAliasException
ServiceNoAliasException(const ServiceInfo &service_r, const std::string &msg_r)
zypp::repo::ServiceNoAliasException::ServiceNoAliasException
ServiceNoAliasException(const ServiceInfo &service_r)
zypp::repo::ServiceNoAliasException::ServiceNoAliasException
ServiceNoAliasException()
zypp::repo::ServiceNoAliasException::ServiceNoAliasException
ServiceNoAliasException(const std::string &msg_r)
zypp::repo::ServiceNoUrlException
Service has no or invalid url defined.
Definition: RepoException.h:235
zypp::repo::ServiceNoUrlException::ServiceNoUrlException
ServiceNoUrlException(const std::string &msg_r)
zypp::repo::ServiceNoUrlException::ServiceNoUrlException
ServiceNoUrlException(const ServiceInfo &service_r, const std::string &msg_r)
zypp::repo::ServiceNoUrlException::ServiceNoUrlException
ServiceNoUrlException(const ServiceInfo &service_r)
zypp::repo::ServiceNoUrlException::ServiceNoUrlException
ServiceNoUrlException()
zypp::repo::ServicePluginException
PLUGIN Service related exceptions.
Definition: RepoException.h:252
zypp::repo::ServicePluginException::ServicePluginException
ServicePluginException(const ServiceInfo &service_r, const std::string &msg_r)
zypp::repo::ServicePluginException::ServicePluginException
ServicePluginException(const ServiceInfo &service_r)
zypp::repo::ServicePluginException::ServicePluginException
ServicePluginException(const std::string &msg_r)
zypp::repo::ServicePluginException::ServicePluginException
ServicePluginException()
zypp::repo::ServicePluginImmutableException
Service plugin is immutable.
Definition: RepoException.h:274
zypp::repo::ServicePluginImmutableException::ServicePluginImmutableException
ServicePluginImmutableException(const ServiceInfo &service_r, const std::string &msg_r)
zypp::repo::ServicePluginImmutableException::ServicePluginImmutableException
ServicePluginImmutableException(const ServiceInfo &service_r)
zypp::repo::ServicePluginImmutableException::ServicePluginImmutableException
ServicePluginImmutableException()
zypp::repo::ServicePluginImmutableException::ServicePluginImmutableException
ServicePluginImmutableException(const std::string &msg_r)
zypp::repo::ServicePluginInformalException
Service plugin has trouble providing the metadata but this should not be treated as error.
Definition: RepoException.h:263
zypp::repo::ServicePluginInformalException::ServicePluginInformalException
ServicePluginInformalException(const ServiceInfo &service_r, const std::string &msg_r)
zypp::repo::ServicePluginInformalException::ServicePluginInformalException
ServicePluginInformalException(const ServiceInfo &service_r)
zypp::repo::ServicePluginInformalException::ServicePluginInformalException
ServicePluginInformalException()
zypp::repo::ServicePluginInformalException::ServicePluginInformalException
ServicePluginInformalException(const std::string &msg_r)
str
String related utilities and Regular expression matching.
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2