Bug 320162 E4CommandProcessor.createBinding catch IllegalArgumentException which is never thrown
The code looks like this: TriggerSequence sequence = null; try { sequence = bs.createSequence(keySequence); } catch (IllegalArgumentException ex) { // the sequence is not complete Activator.trace(Policy.DEBUG_MENUS, "failed to create: " + binding, ex); //$NON-NLS-1$ return null; } But when looking at code in KeySequence.getInstance the only Exceptions thrown are: * NPE * ParseException (catched in BindingServiceImpl) I guess the code should catch the NPE and not the never thrown IAE
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4CommandProcessor.java
for (MParameter mParm : modelParms) {
				parameters.put(mParm.getName(), mParm.getValue());
			}
		}
		ParameterizedCommand cmd = cs.createCommand(cmdModel.getElementId(), parameters);
		TriggerSequence sequence = null;
		try {
			sequence = bs.createSequence(keySequence);
		} catch (IllegalArgumentException ex) {
			
			Activator.trace(Policy.DEBUG_MENUS, "failed to create: " + binding, ex); 
			return null;
		}
		Binding keyBinding = null;
		if (cmd == null || sequence == null) {
			System.err.println("Failed to handle binding: " + binding); 
		} else {
			keyBinding = bs.createBinding(sequence, cmd,
					"org.eclipse.ui.defaultAcceleratorConfiguration", bindingContext.getId()); 
		}
		return keyBinding;
	}
	private static void defineContexts(MBindingContext parent, MBindingContext current,
			ContextManager manager) {
		Context context = manager.getContext(current.getElementId());
		if (!context.isDefined()) {
			context.define(current.getName(), current.getDescription(), parent == null ? null
					: parent.getElementId());
		}
		for (MBindingContext child : current.getChildren()) {