Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

YouError.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YouError.h
00014 
00015   Author:     Michael Andres <ma@suse.de>
00016   Maintainer: Michael Andres <ma@suse.de>
00017 
00018   Purpose: Definition of "You" error values.
00019 
00020 /-*/
00021 #ifndef YouError_h
00022 #define YouError_h
00023 
00024 #include <iosfwd>
00025 
00026 #include <y2pm/PMError.h>
00027 
00029 //
00030 //      CLASS NAME : YouError
00035 class YouError {
00036 
00037   private:
00038 
00039     friend class PMError;
00040 
00041     static const std::string errclass;
00042 
00043     static std::string errtext( const unsigned e );
00044 
00045   public:
00046 
00047     enum Error {
00048       E_ok    = PMError::E_ok,          // no error
00049       E_error = PMError::C_YouError,    // some error
00050       // more specific errors start here:
00051       E_bad_sig_file,
00052       E_bad_sig_rpm,
00053       E_get_youservers_failed,
00054       E_write_youservers_failed,
00055       E_read_youservers_failed,
00056       E_user_abort,
00057       E_user_skip,
00058       E_user_skip_all,
00059       E_user_retry,
00060       E_parse_error,
00061       E_script_failed,
00062       E_prescript_failed,
00063       E_postscript_failed,
00064       E_rpm_failed,
00065       E_install_failed,
00066       E_empty_location,
00067       E_read_mediapatches_failed,
00068       E_callback_missing,
00069       E_missing_sig_file,
00070       E_wrong_media
00071     };
00072 
00073     friend std::ostream & operator<<( std::ostream & str, const Error & obj ) {
00074       return str << PMError( obj );
00075     }
00076 };
00077 
00079 
00080 #endif // YouError_h
00081 

Generated on Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6