projects
/
shibboleth
/
opensaml2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Always throw a descriptive exception instead of returning nothing.
[shibboleth/opensaml2.git]
/
saml
/
saml2
/
binding
/
impl
/
SAML2ArtifactDecoder.cpp
diff --git
a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
index
b05e3e2
..
17a22ec
100644
(file)
--- a/
saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
+++ b/
saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
@@
-76,13
+76,11
@@
XMLObject* SAML2ArtifactDecoder::decode(
log.debug("validating input");
const HTTPRequest* httpRequest=dynamic_cast<const HTTPRequest*>(&genericRequest);
log.debug("validating input");
const HTTPRequest* httpRequest=dynamic_cast<const HTTPRequest*>(&genericRequest);
- if (!httpRequest) {
- log.error("unable to cast request to HTTPRequest type");
- return NULL;
- }
+ if (!httpRequest)
+ throw BindingException("Unable to cast request object to HTTPRequest type.");
const char* SAMLart = httpRequest->getParameter("SAMLart");
if (!SAMLart)
const char* SAMLart = httpRequest->getParameter("SAMLart");
if (!SAMLart)
-
return NULL
;
+
throw BindingException("Request missing SAMLart parameter.")
;
const char* state = httpRequest->getParameter("RelayState");
if (state)
relayState = state;
const char* state = httpRequest->getParameter("RelayState");
if (state)
relayState = state;