Examples of ApplicationException


Examples of org.pomizer.exception.ApplicationException

                + "%s";
       
        if (-1 == outputText.indexOf(STATUS_TAG)) {
            final String errorText = readInputStream(process.getErrorStream());
            if (StringUtils.isNullOrEmptyOrBlank(errorText)) {
                throw new ApplicationException(String.format(errorMessageFormat, outputText));
            }
            else {
                throw new ApplicationException(String.format(errorMessageFormat, errorText));
            }
        }
       
        result = XmlUtils.loadXmlDocumentFromString(outputText);
       
View Full Code Here

Examples of org.rhq.enterprise.server.common.ApplicationException

    }

    public void addNotificationLog(int alertId, AlertNotificationLog notificationLog) {
        Alert alert = entityManager.find(Alert.class, alertId);
        if (null == alert) {
            throw new ApplicationException("Alert not found with id [" + alertId + "].");
        }

        // make sure we don't exceed the max message length for the db vendor
        DatabaseType dbType = DatabaseTypeFactory.getDefaultDatabaseType();
        String message = dbType.getString(notificationLog.getMessage(), AlertNotificationLog.MESSAGE_MAX_LENGTH);
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationException

        }
        try {
            doInstallCustomDefaults();
        }
        catch (Exception e) {
            throw new ApplicationException("Unable to install subclass custom defaults", e);
        }
    }
View Full Code Here

Examples of railo.runtime.exp.ApplicationException

  public static long getTotalBytes() throws ApplicationException {
    return physical().getTotalBytes();
  }
 
  public static double getCpuUsage(long time) throws ApplicationException {
    if(time<1) throw new ApplicationException("time has to be bigger than 0");
    if(jsm==null) jsm=new JavaSysMon();
    CpuTimes cput = jsm.cpuTimes();
    if(cput==null) throw new ApplicationException("CPU information are not available for this OS");
    CpuTimes previous = new CpuTimes(cput.getUserMillis(),cput.getSystemMillis(),cput.getIdleMillis());
        sleep(time);
       
        return jsm.cpuTimes().getCpuUsage(previous)*100D;
    }
View Full Code Here

Examples of test.interfaces.ApplicationException

            throws ApplicationException {
        /* This exception should better be done in the client itself because
           it requires no ejb connection.  Anyway this is an "example" on how
           business validation can be done */
        if (value.getTax() < 0)
            throw new ApplicationException("A Customer can not have a negative Tax");
    }
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.