| Summary: | E4CommandProcessor.createBinding catch IllegalArgumentException which is never thrown | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Thomas Schindl <tom.schindl> | ||||
| Component: | UI | Assignee: | Paul Webster <pwebster> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | pwebster, remy.suen | ||||
| Version: | 0.9 | Flags: | tom.schindl:
review+
remy.suen: review+ |
||||
| Target Milestone: | 1.0 RC3 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
The IllegalArgumentException has to be catched though some rows below: !SESSION 2010-07-17 16:19:29.622 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_20 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE Framework arguments: -product org.eclipse.e4.demo.contacts.product Command-line arguments: -product org.eclipse.e4.demo.contacts.product -data /Users/tomschindl/Documents/ecipse_ws/e4_clean_2/../runtime-contacts.product -dev file:/Users/tomschindl/Documents/ecipse_ws/e4_clean_2/.metadata/.plugins/org.eclipse.pde.core/contacts.product/dev.properties -os macosx -ws cocoa -arch x86_64 -consoleLog !ENTRY org.eclipse.osgi 4 0 2010-07-17 16:19:34.113 !MESSAGE Application error !STACK 1 java.lang.IllegalArgumentException: Cannot bind to an incomplete key sequence at org.eclipse.jface.bindings.keys.KeyBinding.<init>(KeyBinding.java:76) at org.eclipse.e4.ui.bindings.internal.BindingServiceImpl.createBinding(BindingServiceImpl.java:71) (In reply to comment #0) > But when looking at code in KeySequence.getInstance the only Exceptions thrown > are: > * NPE > * ParseException (catched in BindingServiceImpl) > The constructor for KeySequence throws IAE PW (In reply to comment #2) > (In reply to comment #0) > > But when looking at code in KeySequence.getInstance the only Exceptions thrown > > are: > > * NPE > > * ParseException (catched in BindingServiceImpl) > > > > The constructor for KeySequence throws IAE > Yes but this one is caught in getInstance() and transformed into an ParseException Created attachment 174693 [details]
Move the IAE catch v01
(In reply to comment #4) > Created an attachment (id=174693) [details] > Move the IAE catch v01 Makes sense to me. Released |
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