author | Michael Krelin <hacker@klever.net> | 2008-01-04 18:41:52 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-01-04 18:41:52 (UTC) |
commit | 8e3f9231383194d94e41032b64d87cc6ef1c2ee8 (patch) (side-by-side diff) | |
tree | 63e9bfa12430e71d322a22784319d3fdb0e25a2b /include/opkele/exception.h | |
parent | 14f6295f3ffb22848d848265042b088a28451677 (diff) | |
download | libopkele-8e3f9231383194d94e41032b64d87cc6ef1c2ee8.zip libopkele-8e3f9231383194d94e41032b64d87cc6ef1c2ee8.tar.gz libopkele-8e3f9231383194d94e41032b64d87cc6ef1c2ee8.tar.bz2 |
exception specializations
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/exception.h | 30 |
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 @@ -152,25 +152,25 @@ namespace opkele { */ class id_res_failed : public exception { public: id_res_failed(OPKELE_E_PARS) : exception(OPKELE_E_CONS) { } }; /** * thrown if the user_setup_url is provided with negative response */ class id_res_setup : public id_res_failed { public: string setup_url; - id_res_setup(OPKELE_E_PARS,const string& su) + id_res_setup(OPKELE_E_PARS,const string& su="") : id_res_failed(OPKELE_E_CONS), setup_url(su) { } ~id_res_setup() throw() { } }; /** * thrown in case of signature mismatch */ class id_res_mismatch : public id_res_failed { public: id_res_mismatch(OPKELE_E_PARS) : id_res_failed(OPKELE_E_CONS) { } }; @@ -193,24 +193,42 @@ namespace opkele { }; /** * thrown in case of nonce reuse or otherwise imperfect nonce. */ class id_res_bad_nonce : public id_res_failed { public: id_res_bad_nonce(OPKELE_E_PARS) : id_res_failed(OPKELE_E_CONS) { } }; /** + * thrown if return_to didn't pass verification + */ + class id_res_bad_return_to : public id_res_failed { + public: + id_res_bad_return_to(OPKELE_E_PARS) + : id_res_failed(OPKELE_E_CONS) { } + }; + + /** + * thrown if OP isn't authorized to make an assertion + */ + class id_res_unauthorized : public id_res_failed { + public: + id_res_unauthorized(OPKELE_E_PARS) + : id_res_failed(OPKELE_E_CONS) { } + }; + + /** * openssl malfunction occured */ class exception_openssl : public exception { public: unsigned long _error; string _ssl_string; exception_openssl(OPKELE_E_PARS); ~exception_openssl() throw() { } }; /** * network operation related error occured @@ -263,15 +281,25 @@ namespace opkele { : exception(OPKELE_E_CONS) { } }; /** * internal error, indicates internal libopkele problem */ class internal_error : public exception { public: internal_error(OPKELE_E_PARS) : exception(OPKELE_E_CONS) { } }; + /** + * thrown in case of unsupported parameter encountered (e.g. unsupported + * association type). + */ + class unsupported : public exception { + public: + unsupported(OPKELE_E_PARS) + : exception(OPKELE_E_CONS) { } + }; + } #endif /* __OPKELE_EXCEPTION_H */ |