00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PkgModuleError_h
00022 #define PkgModuleError_h
00023
00024 #include <iosfwd>
00025
00026 #include <y2pm/ModulePkgError.h>
00027
00029
00030
00035 class PkgModuleError : private ModulePkgError {
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,
00049 E_error = PMError::C_ModulePkgError,
00050
00051 E_bad_args,
00052 };
00053
00054 friend std::ostream & operator<<( std::ostream & str, const Error & obj ) {
00055 return str << PMError( obj );
00056 }
00057
00058 public:
00059
00060 PkgModuleError() {
00061 errtextfnc = errtext;
00062 }
00063 };
00064
00066
00067 #endif // PkgModuleError_h
00068