UserRequestException.cc

Go to the documentation of this file.
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( Kind kind_r, const std::string & msg_r )
00033   : Exception( msg_r ), _kind( kind_r )
00034   {}
00035 
00037   //
00038   //    METHOD NAME : UserRequestException::dumpOn
00039   //    METHOD TYPE : std::ostream &
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         // no default !
00051     }
00052     return str << " request: " << msg();
00053   }
00054 
00056 } // namespace zypp

doxygen