jdl-api-cpp-3.4.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RequestAdExceptions.h
Go to the documentation of this file.
1 /*
2 Copyright (c) Members of the EGEE Collaboration. 2004.
3 See http://www.eu-egee.org/partners/ for details on the
4 copyright holders.
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15 either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 */
19 
20 #ifndef GLITE_WMS_COMMON_CLIENT_JOBADEXCEPTIONS_H
21 #define GLITE_WMS_COMMON_CLIENT_JOBADEXCEPTIONS_H
22 
23 #define GLITE_STACK_JDL_CATCH(exc_name)catch(exc_name &exc){exc.push_back(__FILE__,LINE,METHOD);throw;}
24 #define GLITE_STACK_JDL_CATCH_ALL() }\
25 GLITE_STACK_JDL_CATCH(AdSemanticMandatoryException) \
26 GLITE_STACK_JDL_CATCH(AdSemanticPathException) \
27 GLITE_STACK_JDL_CATCH(AdSemanticGroupException) \
28 GLITE_STACK_JDL_CATCH(AdMismatchException) \
29 GLITE_STACK_JDL_CATCH(AdFormatException) \
30 GLITE_STACK_JDL_CATCH(AdListException) \
31 GLITE_STACK_JDL_CATCH(AdEmptyException) \
32 GLITE_STACK_JDL_CATCH(AdExtractedException) \
33 GLITE_STACK_JDL_CATCH(glite::wmsutils::exception::Exception) \
34 catch(std::exception &ex){glite::wmsutils::exception::Exception \
35 exc(__FILE__,__LINE__,METHOD,0,"Standard exception: "+std::string(ex.what()));throw exc;}
36 
37 /*
38  * RequestAdExceptions.h
39  * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved.
40  * Contributors are mentioned in the code where appropriate.
41  */
42 #include "glite/wmsutils/exception/Exception.h"
43 namespace glite {
44 namespace jdl {
45 
55 class RequestAdException : public glite::wmsutils::exception::Exception {
56  public:
57  const char* what() throw();
58  protected:
62  RequestAdException (std::string file,
63  int line,
64  std::string method,
65  int code,
66  std::string exception_name) ;
67  virtual ~RequestAdException() throw () {};
68  std::string error_description ;
69 };//End CLass RequestAdException
70 
71 
76 public:
77  AdClassAdException (std::string file,
78  int line,
79  std::string method,
80  int code ,
81  std::string method_name ,
82  std::string error_description = "");
83 };//End CLass AdClassAdException
84 
85 
86 
91 public:
92  AdSyntaxException (std::string file,
93  int line,
94  std::string method,
95  int code ,
96  std::string attr_name );
97 };//End CLass AdSyntaxException
98 
99 
100 
105 public:
109  AdSemanticException (std::string file,
110  int line,
111  std::string method,
112  int code,
113  std::string exception_name );
114 };//End CLass AdSemanticException
115 
120  public:
124  AdSemanticMandatoryException (std::string file,
125  int line,
126  std::string method,
127  int code,
128  std::string attr_name );
129  };//End CLass AdSemanticMandatoryException
130 
131 
136  public:
140  AdSemanticPathException (std::string file,
141  int line,
142  std::string method,
143  int code,
144  std::string attr_name,
145  std::string path_name );
146  };//End CLass AdSemanticPathException
147 
152  public:
156  AdSemanticGroupException (std::string file,
157  int line,
158  std::string method,
159  int code,
160  std::string attrs_name );
161  };//End CLass AdSemanticGroupException
162 
167  public:
168  AdAttributeException (std::string file,
169  int line,
170  std::string method,
171  int code,
172  std::string exception_name );
173 };//End CLass AdAttibuteException
174 
179  public:
183  AdMismatchException (std::string file,
184  int line,
185  std::string method,
186  int code,
187  std::string attr_name,
188  std::string error_description = "" );
189 
190  };//End CLass AdMismatchException
191 
196  public:
200  AdFormatException(std::string file,
201  int line,
202  std::string method,
203  int code,
204  std::string attr_name,
205  std::string format ="");
206  };//End CLass AdFormatException
211  public:
215  AdListException(std::string file,
216  int line,
217  std::string method,
218  int code,
219  std::string attr_name );
220 
221  };//End CLass AdListException
222 
223 
228  public:
232  AdEmptyException(std::string file,
233  int line,
234  std::string method,
235  int code,
236  std::string attr_name );
237  };//End CLass AdEmptyException
238 
243 public:
244  AdExtractedException (std::string file,
245  int line,
246  std::string method,
247  int code,
248  std::string error_description);
249 };//End CLass AdExtractedAdException
250 
251 } // jdl namespace
252 } // glite namespace
253 
254 #endif
AdClassAdException(std::string file, int line, std::string method, int code, std::string method_name, std::string error_description="")
Definition: RequestAdExceptions.h:75
Definition: RequestAdExceptions.h:195
AdListException(std::string file, int line, std::string method, int code, std::string attr_name)
Definition: RequestAdExceptions.h:227
Definition: RequestAdExceptions.h:55
Definition: RequestAdExceptions.h:210
AdSemanticException(std::string file, int line, std::string method, int code, std::string exception_name)
AdSemanticGroupException(std::string file, int line, std::string method, int code, std::string attrs_name)
Definition: RequestAdExceptions.h:242
Definition: RequestAdExceptions.h:151
virtual ~RequestAdException()
Definition: RequestAdExceptions.h:67
AdSemanticPathException(std::string file, int line, std::string method, int code, std::string attr_name, std::string path_name)
Definition: RequestAdExceptions.h:104
AdSyntaxException(std::string file, int line, std::string method, int code, std::string attr_name)
Definition: RequestAdExceptions.h:90
std::string error_description
Definition: RequestAdExceptions.h:67
Definition: RequestAdExceptions.h:119
AdEmptyException(std::string file, int line, std::string method, int code, std::string attr_name)
Definition: RequestAdExceptions.h:166
Definition: RequestAdExceptions.h:178
AdMismatchException(std::string file, int line, std::string method, int code, std::string attr_name, std::string error_description="")
AdAttributeException(std::string file, int line, std::string method, int code, std::string exception_name)
AdExtractedException(std::string file, int line, std::string method, int code, std::string error_description)
RequestAdException(std::string file, int line, std::string method, int code, std::string exception_name)
AdSemanticMandatoryException(std::string file, int line, std::string method, int code, std::string attr_name)
AdFormatException(std::string file, int line, std::string method, int code, std::string attr_name, std::string format="")
Definition: RequestAdExceptions.h:135