Author: mlandres Date: Thu May 3 15:33:02 2007 New Revision: 5472 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5472&view=rev Log: docs updated Modified: trunk/libzypp/zypp/base/UserRequestException.h Modified: trunk/libzypp/zypp/base/UserRequestException.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/base/UserRequestException.h?rev=5472&r1=5471&r2=5472&view=diff ============================================================================== --- trunk/libzypp/zypp/base/UserRequestException.h (original) +++ trunk/libzypp/zypp/base/UserRequestException.h Thu May 3 15:33:02 2007 @@ -27,7 +27,39 @@ /** Base for exceptions caused by explicit user request. * * Use the derived convenience classes to throw exceptions - * of a certain kind.. + * of a certain kind. + * \code + * 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( "" ) ); + * } + * \endcode + * \code + * // either this way + * catch ( const AbortRequestException & excpt_r ) + * { + * ... + * } + * + * // or that + * catch ( const UserRequestException & excpt_r ) + * { + * switch ( excpt_r.kind() ) + * { + * case UserRequestException::ABORT: + * ... + * break; + * } + * } + * \endcode */ class UserRequestException : public Exception { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org