summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/exception.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/include/opkele/exception.h b/include/opkele/exception.h
index d003ce4..c200a13 100644
--- a/include/opkele/exception.h
+++ b/include/opkele/exception.h
@@ -158,13 +158,13 @@ namespace opkele {
158 /** 158 /**
159 * thrown if the user_setup_url is provided with negative response 159 * thrown if the user_setup_url is provided with negative response
160 */ 160 */
161 class id_res_setup : public id_res_failed { 161 class id_res_setup : public id_res_failed {
162 public: 162 public:
163 string setup_url; 163 string setup_url;
164 id_res_setup(OPKELE_E_PARS,const string& su) 164 id_res_setup(OPKELE_E_PARS,const string& su="")
165 : id_res_failed(OPKELE_E_CONS), setup_url(su) { } 165 : id_res_failed(OPKELE_E_CONS), setup_url(su) { }
166 ~id_res_setup() throw() { } 166 ~id_res_setup() throw() { }
167 }; 167 };
168 /** 168 /**
169 * thrown in case of signature mismatch 169 * thrown in case of signature mismatch
170 */ 170 */
@@ -199,12 +199,30 @@ namespace opkele {
199 public: 199 public:
200 id_res_bad_nonce(OPKELE_E_PARS) 200 id_res_bad_nonce(OPKELE_E_PARS)
201 : id_res_failed(OPKELE_E_CONS) { } 201 : id_res_failed(OPKELE_E_CONS) { }
202 }; 202 };
203 203
204 /** 204 /**
205 * thrown if return_to didn't pass verification
206 */
207 class id_res_bad_return_to : public id_res_failed {
208 public:
209 id_res_bad_return_to(OPKELE_E_PARS)
210 : id_res_failed(OPKELE_E_CONS) { }
211 };
212
213 /**
214 * thrown if OP isn't authorized to make an assertion
215 */
216 class id_res_unauthorized : public id_res_failed {
217 public:
218 id_res_unauthorized(OPKELE_E_PARS)
219 : id_res_failed(OPKELE_E_CONS) { }
220 };
221
222 /**
205 * openssl malfunction occured 223 * openssl malfunction occured
206 */ 224 */
207 class exception_openssl : public exception { 225 class exception_openssl : public exception {
208 public: 226 public:
209 unsigned long _error; 227 unsigned long _error;
210 string _ssl_string; 228 string _ssl_string;
@@ -269,9 +287,19 @@ namespace opkele {
269 class internal_error : public exception { 287 class internal_error : public exception {
270 public: 288 public:
271 internal_error(OPKELE_E_PARS) 289 internal_error(OPKELE_E_PARS)
272 : exception(OPKELE_E_CONS) { } 290 : exception(OPKELE_E_CONS) { }
273 }; 291 };
274 292
293 /**
294 * thrown in case of unsupported parameter encountered (e.g. unsupported
295 * association type).
296 */
297 class unsupported : public exception {
298 public:
299 unsupported(OPKELE_E_PARS)
300 : exception(OPKELE_E_CONS) { }
301 };
302
275} 303}
276 304
277#endif /* __OPKELE_EXCEPTION_H */ 305#endif /* __OPKELE_EXCEPTION_H */