Examples of initCause()


Examples of org.springframework.security.core.userdetails.UsernameNotFoundException.initCause()

            return SpringSecurityLdapTemplate.searchForSingleEntryInternal(ctx, searchCtls, searchRoot, searchFilter,
                new Object[]{bindPrincipal});
        } catch (IncorrectResultSizeDataAccessException incorrectResults) {
            if (incorrectResults.getActualSize() == 0) {
                UsernameNotFoundException userNameNotFoundException = new UsernameNotFoundException("User " + username + " not found in directory.", username);
                userNameNotFoundException.initCause(incorrectResults);
                throw badCredentials(userNameNotFoundException);
            }
            // Search should never return multiple results if properly configured, so just rethrow
            throw incorrectResults;
        }
View Full Code Here

Examples of org.teiid.test.framework.exception.QueryTestFailedException.initCause()

      actualException, sql, expectedResultsFile, false);

      } catch (Throwable e) {
    QueryTestFailedException t = new QueryTestFailedException(
      e.getMessage());
    t.initCause(e);
    throw t;
      }
     
      if (results != null && results.size() > 0) {
    return results;
View Full Code Here

Examples of org.tmatesoft.hg.core.HgRepositoryNotFoundException.initCause()

        throw new HgRepositoryNotFoundException(String.format("%s: repository version is not supported (Mercurial <0.9?)", repoPath)).setLocation(location.getPath());
      }
      return rv;
    } catch (HgRuntimeException ex) {
      HgRepositoryNotFoundException e = new HgRepositoryNotFoundException("Failed to initialize Hg4J library").setLocation(location.getPath());
      e.initCause(ex);
      throw e;
    }
  }
 
  public HgBundle loadBundle(File location) throws HgRepositoryNotFoundException {
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgInvalidStateException.initCause()

      try {
        sha1 = MessageDigest.getInstance("SHA-1");
      } catch (NoSuchAlgorithmException ex) {
        // could hardly happen, JDK from Sun always has sha1.
        HgInvalidStateException t = new HgInvalidStateException("Need SHA-1 algorithm for nodeid calculation");
        t.initCause(ex);
        throw t;
      }
    }
    return sha1;
  }
View Full Code Here

Examples of org.uncommons.maths.random.SeedException.initCause()

    for (SeedGenerator generator : generators) {
      try {
        return generator.generateSeed(length);
      } catch (SeedException e) {
        if (savedException != null) {
          savedException.initCause(e);
        }
        savedException = e;
      }
    }
    if (savedException != null) {
View Full Code Here

Examples of org.vfny.geoserver.ServiceException.initCause()

                gzipOut.flush();
            }
        } catch (TransformerException gmlException) {
            ServiceException serviceException = new ServiceException(results.getRequest().getHandle()
                    + " error:" + gmlException.getMessage());
            serviceException.initCause(gmlException);
            throw serviceException;
        }
    }

    public String getContentDisposition(String featureTypeName) {
View Full Code Here

Examples of org.vfny.geoserver.wfs.WfsException.initCause()

        } catch (IOException ioException) {
            ioException.printStackTrace(System.out);

            WfsException wfsException = new WfsException(
                    "Problem aquiring lock");
            wfsException.initCause(ioException);
            throw wfsException;
        }
    }

    /**
 
View Full Code Here

Examples of org.vfny.geoserver.wms.WmsException.initCause()

            bos.flush();
            bos.close();
           
        } catch(IOException ioe){
            WmsException we  = new WmsException(ioe.getMessage());
            we.initCause(ioe);
            throw we;
        }
    }
   
    /**
 
View Full Code Here

Examples of org.w3c.dom.DOMException.initCause()

            return writer.toString();
        } catch (Exception e) {
            DOMException domExcep = new DOMException(
                    DOMException.INVALID_ACCESS_ERR,
                    "Unable to serailise DOM subtree.");
            domExcep.initCause(e);
            throw domExcep;
        }
    }

    /**
 
View Full Code Here

Examples of org.wijiscommons.ssaf.exception.DropoffMailBoxException.initCause()

      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(authentication);
    }
    catch (SSAFAuthorizationException authorization)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
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.