Code example for Exception

Methods: getMessage

0
            throws AxisFault { 
        try { 
            return stub.configureServiceGroupMTOM(mtomState, serviceGroupName);
        } catch (java.lang.Exception e) {
            String msg = "Cannot change MOM state of Axis service group" + serviceGroupName
                         + " .  Error is "+ e.getMessage();
            handleException(msg, e);
        } 
 
        return null; 
    } 
 
    /** 
     * @param serviceGroupName 
     * @return 
     * @throws AxisFault 
     */ 
    public ServiceGroupMetaData listServiceGroup(String serviceGroupName) throws AxisFault {
        try { 
            return stub.listServiceGroup(serviceGroupName);
        } catch (java.lang.Exception e) {
            String msg = "Cannot get service group data. Error is "+ e.getMessage();
            handleException(msg, e);
        } 
        return null; 
    } 
 
    /** 
     * @param serviceGroupName 
     * @param params 
     * @throws AxisFault 
     */ 
    public void setServiceGroupParamters(String serviceGroupName, List<String> params)
            throws AxisFault { 
        try { 
            stub.setServiceGroupParameters(serviceGroupName, params.toArray(new String[params
                    .size()]));
        } catch (java.lang.Exception e) {
            String msg = "Cannot get service group data.  Error is "+ e.getMessage();
            handleException(msg, e);
        } 
    } 
 
    /** 
     * @param serviceGroupName 
     * @param parameterName 
     * @throws AxisFault 
     */ 
    public void removeServiceGroupParameter(String serviceGroupName, String parameterName)
            throws AxisFault { 
        try { 
            stub.removeServiceGroupParameter(serviceGroupName, parameterName);
        } catch (java.lang.Exception e) {
            handleException("Could not remove service group parameter. Service group: " 
                            + serviceGroupName + ", parameterName=" + parameterName, e);
        } 
    } 
 
    /** 
     * @param serviceGroupName 
     * @return 
     * @throws AxisFault 
     */ 
    public String dumpAAR(String serviceGroupName) throws AxisFault {
        try { 
            String dumpValue = stub.dumpAAR(serviceGroupName);
            if (dumpValue != null) {
                return dumpValue;
            } else { 
                handleException("Service archive creation is not supported by this service type"); 
            } 
        } catch (java.lang.Exception e) {
            handleException(e.getMessage(), e);
        } 
 
        return null; 
    } 
 
    /** 
     * @param msg 
     * @param e 
     * @throws AxisFault 
     */ 
    private void handleException(String msg, Exception e) throws AxisFault {
        log.error(msg, e);
        throw new AxisFault(msg, e);
    } 
 
    private void handleException(String msg) throws AxisFault {
        log.error(msg);
        throw new AxisFault(msg);