Examples of initCause()


Examples of javax.security.auth.login.CredentialException.initCause()

                    (new WonderlandIdentity(username, fullname, email));
        } catch (AuthenticationException ae) {
            logger.warning("Authentication error: " + ae);
           
            CredentialException ce = new CredentialException("Error authenticating token");
            ce.initCause(ae);
            throw ce;
        } catch (NamingException ne) {
            logger.warning("Authentication error: " + ne);
           
            CredentialException ce = new CredentialException("Error reading attribute");
View Full Code Here

Examples of javax.security.auth.login.FailedLoginException.initCause()

            Throwable ex = getValidateError();
            FailedLoginException fle = new FailedLoginException("Password Incorrect/Password Required");
            if( ex != null )
            {
               log.debug("Bad password for username="+username, ex);
               fle.initCause(ex);
            }
            else
            {
               log.debug("Bad password for username="+username);
            }
View Full Code Here

Examples of javax.security.auth.login.LoginException.initCause()

         return true;
      }
      catch (Exception e)
      {
         LoginException le = new LoginException();
         le.initCause(e);
         throw le;
      }
   }

   /**
 
View Full Code Here

Examples of javax.security.auth.message.AuthException.initCause()

            if (userId != null) {
                try {
                    setupUser(client, userId);
                } catch (UnsupportedCallbackException uce) {
                    AuthException ae = new AuthException();
                    ae.initCause(uce);
                    throw ae;
                }
            } else if (requestPolicy.isMandatory()) {
                // otherwise, if the login is mandatory, it's a failure, since
                // there was no user id
View Full Code Here

Examples of javax.security.sasl.SaslException.initCause()

        Throwable eT1;
        eT = new SaslException();

        for (int l = 0; l < thUpd.length; l++) {
            try {
                eT1 = eT.initCause(thUpd[l]);
                assertEquals("Incorrect throwable", eT1, eT);
                assertEquals("Incorrect cause", eT.getCause(), thUpd[l]);
            } catch (IllegalStateException e) {
                if (l == 0) {
                    fail("Unexpected exception " + e);
View Full Code Here

Examples of javax.servlet.ServletException.initCause()

        } catch (IllegalAccessException e) {
            throw new ServletException("Error invoking test: " + e.getMessage());
        } catch (InvocationTargetException e) {
            Throwable root = e.getTargetException();
            ServletException ex = new ServletException("Test '" + testName + "' failed");
            ex.initCause(root);
            throw ex;
        }
 
        response.setContentType("text/plain");
        response.getWriter().println("Test '" + testName + "' passed");
View Full Code Here

Examples of javax.servlet.UnavailableException.initCause()

  } catch (Exception ex) {
      // Catch exceptions here so that we can provide a better
      // exception which will show up in the browser.
      ServletException wrap = new UnavailableException(
        "Error initializing JSF: " + ex.getMessage());
      wrap.initCause(ex);
      throw wrap;
  }
        facesServlet.init(servletConfig);
    }
View Full Code Here

Examples of javax.servlet.jsp.JspException.initCause()

                if (getPattern() != null)
                    numberFormat.applyPattern(getPattern());
            }
            catch (Exception e) {
                JspException jspException = new JspException(Bundle.getString("Tags_NumberFormatPatternException", e.getMessage()), e);
                jspException.initCause(e);
                throw jspException;
            }

            // parse the number
            if (dataToFormat.toString().length() == 0) {
View Full Code Here

Examples of javax.servlet.jsp.JspTagException.initCause()

            pageContext.setAttribute("marinerRequestContext", context);

        } catch (Exception e) {
            JspTagException wrapper = new JspTagException(
                    "Could not create request context");
            wrapper.initCause(e);
            throw wrapper;
        }

        return EVAL_BODY_INCLUDE;
    }
View Full Code Here

Examples of javax.servlet.sip.ServletParseException.initCause()

        try {
            validateAndSetParsetResult(pr);
        } catch (IllegalArgumentException iae) {
            ServletParseException spe = new ServletParseException(iae.getMessage());
            throw ServletParseException.class.cast(spe.initCause(iae));
        }
    }

    public String getScheme() {
        return SipFactoryImpl.TEL_URI_PROTOCOL;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.