00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00013 #include <string> 00014 #include <iostream> 00015 00016 #include "zypp/target/rpm/RpmException.h" 00017 00018 using namespace std; 00019 00021 namespace zypp 00022 { 00023 namespace target { 00025 namespace rpm { 00027 00028 std::ostream & RpmInvalidRootException::dumpOn( std::ostream & str ) const 00029 { 00030 return str << "Illegal root " << _root 00031 << " or dbPath " << _dbpath << endl; 00032 } 00033 00034 std::ostream & RpmAccessBlockedException::dumpOn( std::ostream & str ) const 00035 { 00036 return str << "Access is blocked: Root: " << _root 00037 << " dbPath: " << _dbpath << endl; 00038 } 00039 00040 std::ostream & RpmSubprocessException::dumpOn( std::ostream & str ) const 00041 { 00042 return str << "Subprocess failed. Error: " << _errmsg << endl; 00043 } 00044 00045 std::ostream & RpmInitException::dumpOn( std::ostream & str) const 00046 { 00047 return str << "Failed to initialize database: Root: " << _root 00048 << " dbPath: " << _dbpath << endl; 00049 } 00050 00051 std::ostream & RpmDbOpenException::dumpOn( std::ostream & str) const 00052 { 00053 return str << "Failed to open database: Root: " << _root 00054 << " dbPath: " << _dbpath << endl; 00055 } 00056 00057 std::ostream & RpmDbAlreadyOpenException::dumpOn( std::ostream & str) const 00058 { 00059 return str << "Can't switch to " << _new_root << " " << _new_dbpath 00060 << " while accessing " << _old_root << " " << _old_dbpath << endl; 00061 } 00062 00063 std::ostream & RpmDbNotOpenException::dumpOn( std::ostream & str) const 00064 { 00065 return str << "RPM database not open" << endl; 00066 } 00067 00068 std::ostream & RpmDbConvertException::dumpOn( std::ostream & str) const 00069 { 00070 return str << "RPM database conversion failed" << endl; 00071 } 00072 00073 std::ostream & RpmNullDatabaseException::dumpOn( std::ostream & str) const 00074 { 00075 return str << "NULL rpmV4 database passed as argument!" << endl; 00076 } 00077 00079 } // namespace rpm 00080 } // namespace target 00081 } // namespace zypp