-
Notifications
You must be signed in to change notification settings - Fork 121
Caught the exception when a version is malformed in target file #2157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Test Results 771 files ±0 771 suites ±0 54m 16s ⏱️ - 7m 48s For more details on these failures, see this check. Results for commit 91283ae. ± Comparison against base commit 7f53861. ♻️ This comment has been updated with latest results. |
7e72db5 to
a606e61
Compare
a606e61 to
91283ae
Compare
|
@HannesWell @laeubi The test case is failing for Line 93 in a963bee
|
|
@ptziegler can you also have a look? |
#2187 is supposed to improve the failing test. |
| TargetEditor_4=Target Editor | ||
| TargetEditor_5=Unable to load target definition model. Fix the target definition model in Source View. | ||
| TargetEditor_6=The editor input ''{0}'' is not supported. | ||
| TargetEditor_7=Unable to parse the IU version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| TargetEditor_7=Unable to parse the IU version | |
| TargetEditor_7=Unable to parse the IU version. Fix the target definition model in Source View. |
I generally not only like if an error message tells me what's wrong, but also how to fix it.
| } catch (IllegalArgumentException e) { | ||
| fTarget = service.newTarget(); | ||
| throw new CoreException(Status.error(e.getMessage(), e)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } catch (IllegalArgumentException e) { | |
| fTarget = service.newTarget(); | |
| throw new CoreException(Status.error(e.getMessage(), e)); | |
| } |
I don't think catching the exception here is a good idea. If you do this, the editor will automatically switch to the source tab without showing the error dialog.
Additionally you can freely switch from the source tab to any other tab, without the dialog appearing. You need to go back to the source tab first and only then will the dialog appear, when trying to switch to a different tab again.
Without this catch block, the editor tries to open the definition tab, show the error dialog and then switches to the source tab.
Issue: #1945
Exception is caught to open the target editor when a version is malformed.