00001
00002
00003
00004
00005
00006
00007
00008
00012 #include <iostream>
00013
00014
00015 #include "zypp/base/UserRequestException.h"
00016
00017 using std::endl;
00018
00020 namespace zypp
00021 {
00022
00024
00025
00026
00027
00028 UserRequestException::UserRequestException( const std::string & msg_r )
00029 : Exception( msg_r ), _kind( UNSPECIFIED )
00030 {}
00031
00032 UserRequestException::UserRequestException( Kind kind_r, const std::string & msg_r )
00033 : Exception( msg_r ), _kind( kind_r )
00034 {}
00035
00037
00038
00039
00040
00041 std::ostream & UserRequestException::dumpOn( std::ostream & str ) const
00042 {
00043 switch ( _kind )
00044 {
00045 case UNSPECIFIED: str << "UNSPECIFIED"; break;
00046 case IGNORE: str << "IGNORE"; break;
00047 case SKIP: str << "SKIP"; break;
00048 case RETRY: str << "RETRY"; break;
00049 case ABORT: str << "ABORT"; break;
00050
00051 }
00052 return str << " reqest: " << msg();
00053 }
00054
00056 }