Package com.pcmsolutions.system

Examples of com.pcmsolutions.system.CommandFailedException


    }

    public void execute(Object invoker, Object[] arguments) throws IllegalArgumentException, CommandFailedException  // IllegalArgumentException thrown for insufficient number of arguments
    {
        if (getTarget() == null)
            throw new CommandFailedException();

//        tp.setText(getTarget().getDeviceConfigReport());
        //JOptionPane.showMessageDialog(ZoeosFrame.getInstance(), getTarget().getDeviceConfigReport(), "Device Configuration", JOptionPane.INFORMATION_MESSAGE);

        /*final String[][] report = getTarget().getTabularDeviceConfigReport();
View Full Code Here


            } else {
                for ( int i=0;i<zones.length;i++)
                zones[i].trySetOriginalKeyFromSampleName();
            }
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found.");
        } catch (NoSuchVoiceException e) {
            throw new CommandFailedException("No such voice ");
        } catch (PresetEmptyException e) {
            throw new CommandFailedException("Preset Empty");
        } catch (NoSuchZoneException e) {
            throw new CommandFailedException("No Such Zone");
        }
    }
View Full Code Here

    {
        Integer offset;
        try {
            offset = IntPool.get(Integer.parseInt(arguments[0].toString()));
        } catch (NumberFormatException e) {
            throw new CommandFailedException("not a valid offset");
        }

        ContextEditablePreset[] presets = getTargets();
        int num = presets.length;
        ContextEditablePreset p;
        try {
            for (int n = 0; n < num; n++) {
                offsetSamples(presets[n], offset);
                Thread.yield();
            }
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found.");
        }
    }
View Full Code Here

    }

    public void execute(Object invoker, Object[] arguments) throws IllegalArgumentException, CommandFailedException  // IllegalArgumentException thrown for insufficient number of arguments
    {
        if (getTarget() == null)
            throw new CommandFailedException();
        try {
            getTarget().setPresetName((String) arguments[0]);
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found.");
        } catch (PresetEmptyException e) {
            throw new CommandFailedException("Preset is Empty.");
        }
    }
View Full Code Here

                    //  }
                }
                Thread.yield();
            }
            if (problemCount == targets.length && emptyCount == targets.length) {
                throw new CommandFailedException((targets.length == 1 ? "Unable to create editor - preset was empty" : "Unable to create editors - all the presets were empty"));
            } else if (problemCount == targets.length && emptyCount == 0) {
                throw new CommandFailedException((targets.length == 1 ? "Unable to create editor" : "Unable to create editors"));
            } else if (problemCount > 0 && emptyCount == 0)
                throw new CommandFailedException("Unable to create editor for some of the targets");
            else if (problemCount > 0 && problemCount == emptyCount)
                throw new CommandFailedException("Unable to create editor for some of the targets - some presets were empty");
        }
    }
View Full Code Here

                editVoices(new ContextEditablePreset.EditableVoice[]{v});
            } else {
                editVoices(voices);
            }
        } catch (IllegalParameterIdException e) {
            throw new CommandFailedException("Problem setting up view");
        } catch (ComponentGenerationException e) {
            throw new CommandFailedException(e.getMessage());
        }
    }
View Full Code Here

        try {
            if (num == 0) {
                // try use primary target
                p = getTarget();
                if (p == null)
                    throw new CommandFailedException("Null Target");
                randomizeValue(p);
            } else
                ParameterModelUtilities.dispatchEditChainGroups(ParameterModelUtilities.extractEditableParameterModelChainGroups(params), new EditableParameterModel.EditChainValueProvider() {
                    public Integer getValue(EditableParameterModel model, EditableParameterModel leadModel) throws ParameterUnavailableException {
                        return randomizeValue(model);
                    }
                });
        } catch (ParameterUnavailableException e) {
            throw new CommandFailedException("Parameter unavailable");
        }
    }
View Full Code Here

    }

    public void execute(Object invoker, Object[] arguments) throws IllegalArgumentException, CommandFailedException  // IllegalArgumentException thrown for insufficient number of arguments
    {
        if (getTarget() == null)
            throw new CommandFailedException();
        try {
            getTarget().eraseBank();
        } catch (ZDeviceNotRunningException e) {
            throw new CommandFailedException("Device not running");
        }
    }
View Full Code Here

    {
        if (custom)
            try {
                percent = Math.abs(Float.parseFloat(arguments[0].toString()));
            } catch (NumberFormatException e) {
                throw new CommandFailedException("not a valid percentage");
            }

        EditableParameterModel[] params = getTargets();
        int num = params.length;
        EditableParameterModel p;
View Full Code Here

    {
        ContextEditablePreset.EditableVoice[] voices = getTargets();
        try {
            PresetContextMacros.autoMapGroupKeyWin(voices[0].getPresetContext(), voices[0].getPresetNumber(), voices[0].getVoiceParams(new Integer[]{ID.group})[0]);
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found");
        } catch (PresetEmptyException e) {
            throw new CommandFailedException("Preset Empty");
        } catch (IllegalParameterIdException e) {
            throw new CommandFailedException("Internal error");
        } catch (NoSuchVoiceException e) {
            throw new CommandFailedException("No such voice");
        } catch (NoSuchGroupException e) {
            throw new CommandFailedException("No such group");
        } catch (NoSuchContextException e) {
            throw new CommandFailedException("No such context");
        }
    }
View Full Code Here

TOP

Related Classes of com.pcmsolutions.system.CommandFailedException

Copyright © 2018 www.massapicom. 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.