libzypp  17.9.0
RpmException.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
13 #include <string>
14 #include <iostream>
15 
17 
19 namespace zypp
20 {
21 namespace target
22 {
24 namespace rpm
25 {
27 
28 std::ostream & RpmInvalidRootException::dumpOn( std::ostream & str ) const
29 {
30  return str << "Illegal root " << _root
31  << " or dbPath " << _dbpath;
32 }
33 
34 std::ostream & RpmAccessBlockedException::dumpOn( std::ostream & str ) const
35 {
36  return str << "Access is blocked: Root: " << _root
37  << " dbPath: " << _dbpath;
38 }
39 
40 std::ostream & RpmSubprocessException::dumpOn( std::ostream & str ) const
41 {
42  return str << "Subprocess failed. Error: " << _errmsg;
43 }
44 
45 std::ostream & RpmInitException::dumpOn( std::ostream & str) const
46 {
47  return str << "Failed to initialize database: Root: " << _root
48  << " dbPath: " << _dbpath;
49 }
50 
51 std::ostream & RpmDbOpenException::dumpOn( std::ostream & str) const
52 {
53  return str << "Failed to open database: Root: " << _root
54  << " dbPath: " << _dbpath;
55 }
56 
57 std::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 
63 std::ostream & RpmDbNotOpenException::dumpOn( std::ostream & str) const
64 {
65  return str << "RPM database not open";
66 }
67 
68 std::ostream & RpmDbConvertException::dumpOn( std::ostream & str) const
69 {
70  return str << "RPM database conversion failed";
71 }
72 
73 std::ostream & RpmNullDatabaseException::dumpOn( std::ostream & str) const
74 {
75  return str << "NULL rpmV4 database passed as argument!";
76 }
77 
79 } // namespace rpm
80 } // namespace target
81 } // namespace zypp
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:57
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:68
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:73
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:63
String related utilities and Regular expression matching.
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:45
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:28
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:40
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:51
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
Definition: RpmException.cc:34
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1