UserRequestException.cc
Go to the documentation of this file.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( 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
00047
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
00059 }
00060 return str << " request: " << msg();
00061 }
00062
00064 }