glite/jdl/RequestAdExceptions.h

Go to the documentation of this file.
00001 /*
00002 Copyright (c) Members of the EGEE Collaboration. 2004.
00003 See http://www.eu-egee.org/partners/ for details on the
00004 copyright holders.
00005 
00006 Licensed under the Apache License, Version 2.0 (the "License");
00007 you may not use this file except in compliance with the License.
00008 You may obtain a copy of the License at
00009 
00010     http://www.apache.org/licenses/LICENSE-2.0
00011 
00012 Unless required by applicable law or agreed to in writing, software
00013 distributed under the License is distributed on an "AS IS" BASIS,
00014 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
00015 either express or implied.
00016 See the License for the specific language governing permissions and
00017 limitations under the License.
00018 */
00019 
00020 #ifndef GLITE_WMS_COMMON_CLIENT_JOBADEXCEPTIONS_H
00021 #define GLITE_WMS_COMMON_CLIENT_JOBADEXCEPTIONS_H
00022 
00023 #define GLITE_STACK_JDL_CATCH(exc_name)catch(exc_name &exc){exc.push_back(__FILE__,LINE,METHOD);throw;}
00024 #define GLITE_STACK_JDL_CATCH_ALL() }\
00025 GLITE_STACK_JDL_CATCH(AdSemanticMandatoryException) \
00026 GLITE_STACK_JDL_CATCH(AdSemanticPathException) \
00027 GLITE_STACK_JDL_CATCH(AdSemanticGroupException) \
00028 GLITE_STACK_JDL_CATCH(AdMismatchException) \
00029 GLITE_STACK_JDL_CATCH(AdFormatException) \
00030 GLITE_STACK_JDL_CATCH(AdListException) \
00031 GLITE_STACK_JDL_CATCH(AdEmptyException) \
00032 GLITE_STACK_JDL_CATCH(AdExtractedException) \
00033 GLITE_STACK_JDL_CATCH(glite::wmsutils::exception::Exception) \
00034 catch(std::exception &ex){glite::wmsutils::exception::Exception \
00035 exc(__FILE__,__LINE__,METHOD,0,"Standard exception: "+std::string(ex.what()));throw exc;}
00036 
00037 /*
00038  * RequestAdExceptions.h
00039  * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved.
00040  * Contributors are mentioned in the code where appropriate.
00041  */
00042 #include "glite/wmsutils/exception/Exception.h"
00043 namespace glite {
00044 namespace jdl {
00045 
00055 class RequestAdException : public glite::wmsutils::exception::Exception {
00056  public:
00057         const char* what() throw();
00058  protected:
00062         RequestAdException (std::string file,
00063                                         int line,
00064                                         std::string method,
00065                                         int code,
00066                                         std::string exception_name) ;
00067         virtual ~RequestAdException() throw () {};
00068         std::string          error_description ;
00069 };//End CLass  RequestAdException
00070 
00071 
00075 class AdClassAdException   : public RequestAdException {
00076 public:
00077   AdClassAdException (std::string file,
00078                                       int line,
00079                                      std::string method,
00080                                       int code ,
00081                                      std::string method_name ,
00082                                      std::string error_description = "");
00083 };//End CLass  AdClassAdException
00084 
00085 
00086 
00090 class AdSyntaxException   : public RequestAdException {
00091 public:
00092   AdSyntaxException (std::string file,
00093                                       int line,
00094                                      std::string method,
00095                                       int code ,
00096                                      std::string attr_name );
00097 };//End CLass  AdSyntaxException
00098 
00099 
00100 
00104 class AdSemanticException : public RequestAdException {
00105 public:
00109   AdSemanticException (std::string file,
00110                                       int line,
00111                                      std::string method,
00112                                       int code,
00113                                      std::string exception_name );
00114 };//End CLass  AdSemanticException
00115 
00119      class AdSemanticMandatoryException : public AdSemanticException {
00120         public:
00124         AdSemanticMandatoryException (std::string file,
00125                                         int line,
00126                                        std::string method,
00127                                         int code,
00128                                        std::string attr_name );
00129      };//End CLass  AdSemanticMandatoryException
00130 
00131 
00135      class AdSemanticPathException : public AdSemanticException {
00136         public:
00140         AdSemanticPathException (std::string file,
00141                                         int line,
00142                                        std::string method,
00143                                         int code,
00144                                        std::string attr_name,
00145                                        std::string path_name );
00146      };//End CLass  AdSemanticPathException
00147 
00151      class AdSemanticGroupException : public AdSemanticException {
00152         public:
00156         AdSemanticGroupException (std::string file,
00157                                         int line,
00158                                        std::string method,
00159                                         int code,
00160                                        std::string attrs_name );
00161      };//End CLass  AdSemanticGroupException
00162 
00166 class AdAttributeException : public RequestAdException {
00167    public:
00168       AdAttributeException (std::string file,
00169                                       int line,
00170                                      std::string method,
00171                                       int code,
00172                                      std::string exception_name );
00173 };//End CLass  AdAttibuteException
00174 
00178    class AdMismatchException : public AdAttributeException {
00179         public:
00183         AdMismatchException (std::string file,
00184                                         int line,
00185                                        std::string method,
00186                                         int code,
00187                                        std::string attr_name,
00188                                        std::string error_description = ""  );
00189 
00190    };//End CLass  AdMismatchException
00191 
00195    class AdFormatException : public AdAttributeException {
00196         public:
00200          AdFormatException(std::string file,
00201                                         int line,
00202                                        std::string method,
00203                                         int code,
00204                                        std::string attr_name,
00205                                        std::string format ="");
00206    };//End CLass  AdFormatException
00210    class AdListException : public AdAttributeException {
00211         public:
00215          AdListException(std::string file,
00216                                         int line,
00217                                        std::string method,
00218                                         int code,
00219                                        std::string attr_name );
00220 
00221    };//End CLass  AdListException
00222 
00223 
00227    class AdEmptyException : public AdAttributeException {
00228         public:
00232          AdEmptyException(std::string file,
00233                                         int line,
00234                                        std::string method,
00235                                         int code,
00236                                        std::string attr_name );
00237    };//End CLass  AdEmptyException
00238 
00242 class AdExtractedException: public RequestAdException {
00243 public:
00244         AdExtractedException (std::string file,
00245                 int line,
00246                 std::string method,
00247                 int code,
00248                 std::string error_description);
00249 };//End CLass AdExtractedAdException
00250 
00251 } // jdl namespace
00252 } // glite namespace
00253 
00254 #endif

Generated on 2 Jul 2013 for jdl-api-cpp-3.4.2 by  doxygen 1.4.7