~thopiekar/zypper/libzypp-manual-import

« back to all changes in this revision

Viewing changes to zypp/target/rpm/RpmException.cc

  • Committer: Thomas-Karl Pietrowski
  • Date: 2014-01-29 22:44:28 UTC
  • Revision ID: thopiekar@googlemail.com-20140129224428-gpcqnsdakby362n8
firstĀ import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*---------------------------------------------------------------------\
 
2
|                          ____ _   __ __ ___                          |
 
3
|                         |__  / \ / / . \ . \                         |
 
4
|                           / / \ V /|  _/  _/                         |
 
5
|                          / /__ | | | | | |                           |
 
6
|                         /_____||_| |_| |_|                           |
 
7
|                                                                      |
 
8
\---------------------------------------------------------------------*/
 
9
/** \file zypp/target/rpm/RpmException.cc
 
10
 *
 
11
*/
 
12
 
 
13
#include <string>
 
14
#include <iostream>
 
15
 
 
16
#include "zypp/target/rpm/RpmException.h"
 
17
 
 
18
using namespace std;
 
19
 
 
20
///////////////////////////////////////////////////////////////////
 
21
namespace zypp
 
22
{ /////////////////////////////////////////////////////////////////
 
23
namespace target
 
24
{
 
25
/////////////////////////////////////////////////////////////////
 
26
namespace rpm
 
27
{
 
28
/////////////////////////////////////////////////////////////////
 
29
 
 
30
std::ostream & RpmInvalidRootException::dumpOn( std::ostream & str ) const
 
31
{
 
32
  return str << "Illegal root " << _root
 
33
         << " or dbPath " << _dbpath << endl;
 
34
}
 
35
 
 
36
std::ostream & RpmAccessBlockedException::dumpOn( std::ostream & str ) const
 
37
{
 
38
  return str << "Access is blocked: Root: " << _root
 
39
         << " dbPath: " << _dbpath << endl;
 
40
}
 
41
 
 
42
std::ostream & RpmSubprocessException::dumpOn( std::ostream & str ) const
 
43
{
 
44
  return str << "Subprocess failed. Error: " << _errmsg << endl;
 
45
}
 
46
 
 
47
std::ostream & RpmInitException::dumpOn( std::ostream & str) const
 
48
{
 
49
  return str << "Failed to initialize database: Root: " << _root
 
50
         << " dbPath: " << _dbpath << endl;
 
51
}
 
52
 
 
53
std::ostream & RpmDbOpenException::dumpOn( std::ostream & str) const
 
54
{
 
55
  return str << "Failed to open database: Root: " << _root
 
56
         << " dbPath: " << _dbpath << endl;
 
57
}
 
58
 
 
59
std::ostream & RpmDbAlreadyOpenException::dumpOn( std::ostream & str) const
 
60
{
 
61
  return str << "Can't switch to " << _new_root << " " << _new_dbpath
 
62
         << " while accessing " << _old_root << " " << _old_dbpath << endl;
 
63
}
 
64
 
 
65
std::ostream & RpmDbNotOpenException::dumpOn( std::ostream & str) const
 
66
{
 
67
  return str << "RPM database not open" << endl;
 
68
}
 
69
 
 
70
std::ostream & RpmDbConvertException::dumpOn( std::ostream & str) const
 
71
{
 
72
  return str << "RPM database conversion failed" << endl;
 
73
}
 
74
 
 
75
std::ostream & RpmNullDatabaseException::dumpOn( std::ostream & str) const
 
76
{
 
77
  return str << "NULL rpmV4 database passed as argument!" << endl;
 
78
}
 
79
 
 
80
/////////////////////////////////////////////////////////////////
 
81
} // namespace rpm
 
82
} // namespace target
 
83
} // namespace zypp
 
84
///////////////////////////////////////////////////////////////////