Package com.pcmsolutions.system

Examples of com.pcmsolutions.system.CommandFailedException


                v.splitVoice(((NoteUtilities.Note) arguments[0]).getNoteValue());
            } else {
                getTargets()[0].splitVoice(((NoteUtilities.Note) arguments[0]).getNoteValue());
            }
        } 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 (NoSuchContextException e) {
            throw new CommandFailedException("No such context");
        } catch (TooManyVoicesException e) {
            throw new CommandFailedException("Too many voices");
        } catch (ParameterValueOutOfRangeException e) {
            throw new CommandFailedException("Illegal split key");
        }
    }
View Full Code Here


                    }
                    Thread.yield();
                }
                if (problemCount == targets.length && emptyCount == targets.length) {
                    throw new CommandFailedException((targets.length == 1 ? "Unable to create view - preset was empty" : "Unable to create views - all the presets were empty"));
                } else if (problemCount == targets.length && emptyCount == 0) {
                    throw new CommandFailedException((targets.length == 1 ? "Unable to create view" : "Unable to create views"));
                } else if (problemCount > 0 && emptyCount == 0)
                    throw new CommandFailedException("Unable to create view for some of the targets");
                else if (problemCount > 0 && problemCount == emptyCount)
                    throw new CommandFailedException("Unable to create view for some of the targets - some presets were empty");
            }
        }/* catch (ZDeviceNotRunningException e) {
            throw new CommandFailedException("Device is not running");
        } */ catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found.");
        }
    }
View Full Code Here

                    voices[n].copyVoice();
                    Thread.yield();
                }
            }
        } 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 (CannotRemoveLastVoiceException e) {
            throw new CommandFailedException("Cannot remove last voice");
        } catch (TooManyVoicesException e) {
            throw new CommandFailedException("Too many voices");
        }
    }
View Full Code Here

        try {
            if (num == 0) {
                // try use primary target
                p = getTarget();
                if (p == null)
                    throw new CommandFailedException("Null Target");
                purgeZones(p);
            }
            for (int n = 0; n < num; n++) {
                purgeZones(presets[n]);
                Thread.yield();
            }
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found.");
        }
    }
View Full Code Here

        }
    }

    private void purgeZones(ContextEditablePreset p) throws CommandFailedException, NoSuchPresetException {
        if (p == null)
            throw new CommandFailedException("Null Target");
        try {
            p.purgeZones();
        } catch (PresetEmptyException e) {
        }
    }
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();
        // TODO re-implement this
        // getTarget().showPreferencesDialog();
    }
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.