libzypp: zypp/target/rpm/RpmException.cc Source File

libzypp 17.38.15

RpmException.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12
13#include <string>
14#include <iostream>
15
16#include <zypp/target/rpm/RpmException.h>
17
19namespace zypp
20{
21namespace target
22{
24namespace rpm
25{
27
28std::ostream & RpmInvalidRootException::dumpOn( std::ostream & str ) const
29{
30 return str << "Illegal root " << _root
31 << " or dbPath " << _dbpath;
32}
33
34std::ostream & RpmAccessBlockedException::dumpOn( std::ostream & str ) const
35{
36 return str << "Access is blocked: Root: " << _root
37 << " dbPath: " << _dbpath;
38}
39
40std::ostream & RpmSubprocessException::dumpOn( std::ostream & str ) const
41{
42 return str << "Subprocess failed. Error: " << _errmsg;
43}
44
45std::ostream & RpmInitException::dumpOn( std::ostream & str) const
46{
47 return str << "Failed to initialize database: Root: " << _root
48 << " dbPath: " << _dbpath;
49}
50
51std::ostream & RpmDbOpenException::dumpOn( std::ostream & str) const
52{
53 return str << "Failed to open database: Root: " << _root
54 << " dbPath: " << _dbpath;
55}
56
57std::ostream & RpmDbAlreadyOpenException::dumpOn( std::ostream & str) const
58{
59 return str << "Can't switch to " << _new_root << " " << _new_dbpath
60 << " while accessing " << _old_root << " " << _old_dbpath;
61}
62
63std::ostream & RpmDbNotOpenException::dumpOn( std::ostream & str) const
64{
65 return str << "RPM database not open";
66}
67
68std::ostream & RpmDbConvertException::dumpOn( std::ostream & str) const
69{
70 return str << "RPM database conversion failed";
71}
72
73std::ostream & RpmNullDatabaseException::dumpOn( std::ostream & str) const
74{
75 return str << "NULL rpmV4 database passed as argument!";
76}
77
78std::ostream &RpmTransactionFailedException::dumpOn(std::ostream &str) const
79{
80 return str << _errmsg;
81}
82
84} // namespace rpm
85} // namespace target
86} // namespace zypp
RpmException.h
zypp::target::rpm::RpmAccessBlockedException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:34
zypp::target::rpm::RpmAccessBlockedException::_root
std::string _root
Definition RpmException.h:125
zypp::target::rpm::RpmAccessBlockedException::_dbpath
std::string _dbpath
Definition RpmException.h:126
zypp::target::rpm::RpmDbAlreadyOpenException::_new_root
std::string _new_root
Definition RpmException.h:200
zypp::target::rpm::RpmDbAlreadyOpenException::_old_dbpath
std::string _old_dbpath
Definition RpmException.h:199
zypp::target::rpm::RpmDbAlreadyOpenException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:57
zypp::target::rpm::RpmDbAlreadyOpenException::_new_dbpath
std::string _new_dbpath
Definition RpmException.h:201
zypp::target::rpm::RpmDbAlreadyOpenException::_old_root
std::string _old_root
Definition RpmException.h:198
zypp::target::rpm::RpmDbConvertException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:68
zypp::target::rpm::RpmDbNotOpenException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:63
zypp::target::rpm::RpmDbOpenException::_dbpath
std::string _dbpath
Definition RpmException.h:177
zypp::target::rpm::RpmDbOpenException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:51
zypp::target::rpm::RpmDbOpenException::_root
std::string _root
Definition RpmException.h:176
zypp::target::rpm::RpmInitException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:45
zypp::target::rpm::RpmInitException::_dbpath
std::string _dbpath
Definition RpmException.h:159
zypp::target::rpm::RpmInitException::_root
std::string _root
Definition RpmException.h:158
zypp::target::rpm::RpmInvalidRootException::_dbpath
std::string _dbpath
Definition RpmException.h:100
zypp::target::rpm::RpmInvalidRootException::_root
std::string _root
Definition RpmException.h:99
zypp::target::rpm::RpmInvalidRootException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:28
zypp::target::rpm::RpmNullDatabaseException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:73
zypp::target::rpm::RpmSubprocessException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:40
zypp::target::rpm::RpmSubprocessException::_errmsg
std::string _errmsg
Definition RpmException.h:141
zypp::target::rpm::RpmTransactionFailedException::_errmsg
std::string _errmsg
Definition RpmException.h:255
zypp::target::rpm::RpmTransactionFailedException::dumpOn
std::ostream & dumpOn(std::ostream &str) const override
Overload this to print a proper error message.
Definition RpmException.cc:78
str
String related utilities and Regular expression matching.
zypp::target::rpm
Definition KeyRing.h:327
zypp::target
Definition KeyRing.h:325
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2