libzypp
10.5.0
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #ifndef ZYPP_PLUGINSCRIPTEXCEPTION_H 00013 #define ZYPP_PLUGINSCRIPTEXCEPTION_H 00014 00015 #include <iosfwd> 00016 00017 #include "zypp/base/Exception.h" 00018 #include "zypp/Pathname.h" 00019 00021 namespace zypp 00022 { 00023 00025 class PluginScriptException : public Exception 00026 { 00027 public: 00028 PluginScriptException(); 00029 PluginScriptException( const std::string & msg_r ); 00030 PluginScriptException( const std::string & msg_r, const std::string & hist_r ); 00031 virtual ~PluginScriptException() throw(); 00032 }; 00033 00035 #define declException( EXCP, BASE ) \ 00036 class EXCP : public BASE { \ 00037 public: \ 00038 EXCP() : BASE( #EXCP ) {} \ 00039 EXCP( const std::string & msg_r ) : BASE( msg_r ) {} \ 00040 EXCP( const std::string & msg_r, const std::string & hist_r ) : BASE( msg_r, hist_r ) {} \ 00041 virtual ~EXCP() throw() {} \ 00042 } 00043 00045 declException( PluginScriptNotConnected, PluginScriptException ); 00046 00048 declException( PluginScriptDiedUnexpectedly, PluginScriptException ); 00049 00050 00052 declException( PluginScriptTimeout, PluginScriptException ); 00053 00055 declException( PluginScriptSendTimeout, PluginScriptTimeout ); 00056 00058 declException( PluginScriptReceiveTimeout, PluginScriptTimeout ); 00059 00060 #undef declException 00061 00063 } // namespace zypp 00065 #endif // ZYPP_PLUGINSCRIPTEXCEPTION_H