libzypp 8.13.6
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #include <iostream> 00013 //#include "zypp/base/Logger.h" 00014 00015 #include "zypp/base/UserRequestException.h" 00016 00017 using std::endl; 00018 00020 namespace zypp 00021 { 00022 00024 // 00025 // METHOD NAME : UserRequestException::UserRequestException 00026 // METHOD TYPE : Ctor 00027 // 00028 UserRequestException::UserRequestException( const std::string & msg_r ) 00029 : Exception( msg_r ), _kind( UNSPECIFIED ) 00030 {} 00031 00032 UserRequestException::UserRequestException( const std::string & msg_r, const Exception & history_r ) 00033 : Exception( msg_r, history_r ), _kind( UNSPECIFIED ) 00034 {} 00035 00036 UserRequestException::UserRequestException( Kind kind_r, const std::string & msg_r ) 00037 : Exception( msg_r ), _kind( kind_r ) 00038 {} 00039 00040 UserRequestException::UserRequestException( Kind kind_r, const std::string & msg_r, const Exception & history_r ) 00041 : Exception( msg_r, history_r ), _kind( kind_r ) 00042 {} 00043 00045 // 00046 // METHOD NAME : UserRequestException::dumpOn 00047 // METHOD TYPE : std::ostream & 00048 // 00049 std::ostream & UserRequestException::dumpOn( std::ostream & str ) const 00050 { 00051 switch ( _kind ) 00052 { 00053 case UNSPECIFIED: str << "UNSPECIFIED"; break; 00054 case IGNORE: str << "IGNORE"; break; 00055 case SKIP: str << "SKIP"; break; 00056 case RETRY: str << "RETRY"; break; 00057 case ABORT: str << "ABORT"; break; 00058 // no default ! 00059 } 00060 return str << " request: " << msg(); 00061 } 00062 00064 } // namespace zypp