Fix for pass-through exception code.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 21 Feb 2003 06:07:01 +0000 (06:07 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 21 Feb 2003 06:07:01 +0000 (06:07 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@493 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/AAServlet.java

index ef110ae..49f6178 100755 (executable)
@@ -222,7 +222,8 @@ public class AAServlet extends HttpServlet {
                return properties;
        }
 
-       public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+       public void doPost(HttpServletRequest req, HttpServletResponse resp)
+               throws ServletException, IOException {
 
                log.debug("Recieved a request.");
                MDC.put("serviceId", "[AA] " + new SAMLIdentifier().toString());
@@ -234,7 +235,8 @@ public class AAServlet extends HttpServlet {
                try {
                        saml =
                                new AASaml(
-                                       configuration.getProperty("edu.internet2.middleware.shibboleth.aa.AAServlet.authorityName"),
+                                       configuration.getProperty(
+                                               "edu.internet2.middleware.shibboleth.aa.AAServlet.authorityName"),
                                        configuration.getProperty("edu.internet2.middleware.shibboleth.audiences").replaceAll(
                                                "\\s",
                                                "").split(
@@ -269,7 +271,8 @@ public class AAServlet extends HttpServlet {
                                Arrays.asList(
                                        responder.getReleaseAttributes(
                                                principal,
-                                               configuration.getProperty("edu.internet2.middleware.shibboleth.aa.AAServlet.ldapUserDnPhrase"),
+                                               configuration.getProperty(
+                                                       "edu.internet2.middleware.shibboleth.aa.AAServlet.ldapUserDnPhrase"),
                                                saml.getShar(),
                                                resource));
                        log.info("Got " + attrs.size() + " attributes for " + principal.getName());
@@ -290,9 +293,15 @@ public class AAServlet extends HttpServlet {
                                                resp,
                                                new SAMLException(
                                                        Arrays.asList(codes),
-                                                       "The supplied Attribute Query Handle was unrecognized or expired."));
+                                                       "The supplied Attribute Query Handle was unrecognized or expired.",
+                                                       e));
+
                                } else {
-                                       saml.fail(resp, new SAMLException(Arrays.asList(codes), e));
+                                       saml.fail(
+                                               resp,
+                                               new SAMLException(
+                                                       Arrays.asList(codes),
+                                                       "The supplied Attribute Query Handle was unrecognized or expired."));
                                }
                                return;
                        } catch (Exception ee) {
@@ -306,9 +315,13 @@ public class AAServlet extends HttpServlet {
                                if (configuration
                                        .getProperty("edu.internet2.middleware.shibboleth.aa.AAServlet.passThruErrors", "false")
                                        .equals("true")) {
-                                       saml.fail(resp, new SAMLException(SAMLException.RESPONDER, e));
+                                       saml.fail(
+                                               resp,
+                                               new SAMLException(SAMLException.RESPONDER, "General error processing request.", e));
                                } else {
-                                       saml.fail(resp, new SAMLException(SAMLException.RESPONDER, "General error processing request."));
+                                       saml.fail(
+                                               resp,
+                                               new SAMLException(SAMLException.RESPONDER, "General error processing request."));
                                }
                                return;
                        } catch (Exception ee) {