libzypp
10.5.0
|
Base for exceptions caused by explicit user request. More...
#include <UserRequestException.h>
Public Types | |
enum | Kind { UNSPECIFIED, IGNORE, SKIP, RETRY, ABORT } |
Public Member Functions | |
UserRequestException (const std::string &msg_r=std::string()) | |
UserRequestException (const std::string &msg_r, const Exception &history_r) | |
UserRequestException (Kind kind_r, const std::string &msg_r=std::string()) | |
UserRequestException (Kind kind_r, const std::string &msg_r, const Exception &history_r) | |
Kind | kind () const |
Protected Member Functions | |
virtual std::ostream & | dumpOn (std::ostream &str) const |
Overload this to print a proper error message. | |
Private Attributes | |
Kind | _kind |
Base for exceptions caused by explicit user request.
Use the derived convenience classes to throw exceptions of a certain kind.
ProgressData ticks( makeProgressData( input_r ) ); ticks.sendTo( fnc_r ); ticks.toMin(); // start sending min (0) iostr::EachLine line( input_r ); for( ; line; line.next() ) { // process the line if ( ! ticks.set( input_r.stream().tellg() ) ) ZYPP_THROW( AbortRequestException( "" ) ); }
// either this way catch ( const AbortRequestException & excpt_r ) { ... } // or that catch ( const UserRequestException & excpt_r ) { switch ( excpt_r.kind() ) { case UserRequestException::ABORT: ... break; } }
Definition at line 64 of file UserRequestException.h.
Definition at line 67 of file UserRequestException.h.
zypp::UserRequestException::UserRequestException | ( | const std::string & | msg_r = std::string() | ) | [explicit] |
Definition at line 28 of file UserRequestException.cc.
zypp::UserRequestException::UserRequestException | ( | const std::string & | msg_r, |
const Exception & | history_r | ||
) |
Definition at line 32 of file UserRequestException.cc.
zypp::UserRequestException::UserRequestException | ( | Kind | kind_r, |
const std::string & | msg_r = std::string() |
||
) | [explicit] |
Definition at line 36 of file UserRequestException.cc.
zypp::UserRequestException::UserRequestException | ( | Kind | kind_r, |
const std::string & | msg_r, | ||
const Exception & | history_r | ||
) |
Definition at line 40 of file UserRequestException.cc.
Kind zypp::UserRequestException::kind | ( | ) | const [inline] |
Definition at line 76 of file UserRequestException.h.
std::ostream & zypp::UserRequestException::dumpOn | ( | std::ostream & | str | ) | const [protected, virtual] |
Overload this to print a proper error message.
Reimplemented from zypp::Exception.
Definition at line 49 of file UserRequestException.cc.
Kind zypp::UserRequestException::_kind [private] |
Definition at line 81 of file UserRequestException.h.