Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CredentialException.h

00001 #ifndef  EDG_WORKLOAD_COMMON_CLIENT_CREDENTIALEXCEPTION_H
00002 #define EDG_WORKLOAD_COMMON_CLIENT_CREDENTIALEXCEPTION_H
00003 
00004 /*
00005  * CredentialExceptions.h
00006  * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved.
00007  * Contributors are mentioned in the code where appropriate.
00008  */
00009 
00010 #include "edg/workload/common/utilities/Exceptions.h"
00011 #include "edg/workload/userinterface/client/exception_codes.h"
00012 
00013 // EWC_BEGIN_NAMESPACE; // NameSpace Definition
00014 USERINTERFACE_NAMESPACE_BEGIN//Defining UserInterFace NameSpace
00022 class CredentialException : public  edg::workload::common::utilities::Exception{
00023 public:
00027    CredentialException           (    std::string file,
00028                                    int line,
00029                                   std::string method,
00030                                    int code,
00031                                   std::string exception_name):
00032    Exception(file,line,method,code , exception_name ){};
00033 
00034 };//End CLass CredentialException
00035 
00036 
00037 
00041 class CredProxyException : public CredentialException {
00042 public:
00046    CredProxyException         (    std::string file,
00047                                    int line,
00048                                   std::string method,
00049                                    int code,
00050                                   std::string field
00051                                    ):
00052    CredentialException(file,line,method,code  , "CredProxyException"){
00053    this->error_message = "Unable to "+field +" the proxy certificate file" ;
00054    };
00055 };//End CLass CredProxyException
00056 
00057 
00061 class ProxyException : public CredentialException {
00062 public:
00066    ProxyException   (     std::string file,
00067                                    int line,
00068                                   std::string method):
00069    CredentialException(file,line,method,  WL_PROXY  , "ProxyException"){
00070    this->error_message = "Unable to get credential" ;
00071    };
00072 };//End CLass
00073 
00074 
00077 class VomsException : public CredentialException {
00078 public:
00082    VomsException   (     std::string file,
00083                                    int line,
00084                                   std::string method,
00085                                   int code,
00086                                   std::string field = "" ):
00087 CredentialException(file,line,method,  WL_PROXY  , "VomsException"){
00088         switch( code){
00089                 case WL_VO_LOAD:
00090                         this->error_message = "Unable to Load VirtualOrganisation certificate. SSL method: " + field + " failed.";
00091                         break;
00092                 case WL_VO_TYPE:
00093                         this->error_message = "Unbable to retrieve voms groups for VirtualOrganisation: " + field ;
00094                         break;
00095                 default: // WL_VO_DEFAULT
00096                         this->error_message = "Unable to find default VirtualOrganisation name" ;
00097         }
00098 };
00099 };//End CLass
00100 
00101 
00102 
00106 class CredKeyException : public CredentialException {
00107 public:
00111    CredKeyException          (   std::string file,
00112                                    int line,
00113                                   std::string method,
00114                                    int code
00115                                    ):
00116    CredentialException(file,line,method,code  , "CredKeyException"){
00117    this->error_message = "Unable to load public key from proxy" ;
00118    };
00119 };//End CLass CredKeyException
00120 
00121 // EWC_END_NAMESPACE ;//Close the NameSpace
00122 } USERINTERFACE_NAMESPACE_END  //Closing  UserInterFace NameSpace
00123 #endif

Generated on Fri May 14 14:19:39 2004 for USERINTERFACE C++ API by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002