Examples of UserException


Examples of org.apache.openjpa.util.UserException

    public void rollbackToSavepoint() {
        beginOperation(false);
        try {
            if (_savepoints == null || _savepoints.isEmpty())
                throw new UserException(_loc.get("no-lastsavepoint"));
            rollbackToSavepoint((String) _savepoints.get
                (_savepoints.size() - 1));
        } finally {
            endOperation();
        }
View Full Code Here

Examples of org.apache.openjpa.util.UserException

            assertActiveTransaction();

            int index = (_savepoints == null) ? -1
                : _savepoints.indexOf(savepoint);
            if (index < 0)
                throw new UserException(_loc.get("no-savepoint", savepoint));

            // clear old in reverse
            OpenJPASavepoint save;
            while (_savepoints.size() > index + 1) {
                save = (OpenJPASavepoint) _savepoints.remove
View Full Code Here

Examples of org.apache.openjpa.util.UserException

        }
        OpenJPAException err;
        if (datastore)
            err = new StoreException(_loc.get("nested-exceps"));
        else
            err = new UserException(_loc.get("nested-exceps"));
        throw err.setNestedThrowables(t).setFatal(fatal);
    }
View Full Code Here

Examples of org.apache.openjpa.util.UserException

            // create id for instance
            if (id == null) {
                if (meta.getIdentityType() == ClassMetaData.ID_APPLICATION)
                    id = ApplicationIds.create(pc, meta);
                else if (meta.getIdentityType() == ClassMetaData.ID_UNKNOWN)
                    throw new UserException(_loc.get("meta-unknownid", meta));
                else
                    id = StateManagerId.newInstance(this);
            }

            // make sure we don't already have the instance cached
View Full Code Here

Examples of org.apache.openjpa.util.UserException

     * Throw an exception indicating that the current action can't be
     * performed on a detached object.
     */
    private OpenJPAException newDetachedException(Object obj,
        String operation) {
        throw new UserException(_loc.get("bad-detached-op", operation,
            Exceptions.toString(obj))).setFailedObject(obj);
    }
View Full Code Here

Examples of org.apache.openjpa.util.UserException

    }

    public Query newQuery(String lang, Object query) {
        // common mistakes
        if (query instanceof Extent || query instanceof Class)
            throw new UserException(_loc.get("bad-new-query"));

        beginOperation(false);
        try {
            StoreQuery sq = _store.newQuery(lang);
            if (sq == null) {
View Full Code Here

Examples of org.broadinstitute.gatk.utils.exceptions.UserException

    private void checkArgumentsValues() {
        checkInputReportFile("BQSR",bqsrFile);
        checkInputReportFile("before",beforeFile);
        checkInputReportFile("after",afterFile);
        if (bqsrFile == null && beforeFile == null && afterFile == null) {
            throw new UserException("you must provide at least one recalibration report file "
                    + "(arguments -BQSR, -" + BEFORE_ARG_SHORT_NAME + " or -" + AFTER_ARG_SHORT_NAME);
        }

        checkOutputFile(PDF_ARG_SHORT_NAME,pdfFile);
        checkOutputFile(CSV_ARG_SHORT_NAME, csvFile);
View Full Code Here

Examples of org.davinci.server.user.UserException

    public IUser newUser(IPerson person, IStorage baseDirectory) throws UserException {
       IUser user;
    try {
      user = new OrionUser(person);
    } catch (CoreException e) {
      throw new UserException(e);
    }
       if(init(person.getUserID())){
         try {
        user.createProject(IDavinciServerConstants.DEFAULT_PROJECT);
      } catch (IOException e) {
        throw new UserException(e);
      }
       }
       return user;
    }
View Full Code Here

Examples of org.davinci.server.user.UserException

    public IUser addUser(String userName, String password, String email) throws UserException, IOException {
    assertValidUserId(userName);

    if (checkUserExists(userName)) {
            throw new UserException(UserException.ALREADY_EXISTS);
        }

        if (this.maxUsers > 0 && this.usersCount >= this.maxUsers) {
            throw new UserException(UserException.MAX_USERS);
        }
        IPerson person = this.personManager.addPerson(userName, password, email);
        if (person != null) {
            IUser user = newUser(person,null);
         
View Full Code Here

Examples of org.jboss.test.ws.jaxws.samples.exception.client.UserException

         proxy.throwApplicationException();
         fail("Expected UserException");
      }
      catch (UserException_Exception e)
      {
         UserException ue = e.getFaultInfo();
         assertEquals("SOME VALIDATION ERROR", ue.getMessage());
         assertEquals("validation", ue.getErrorCategory());
         assertEquals(123, ue.getErrorCode());
      }
   }
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.