| Summary: | [director] Improve error message when passing url instead of version | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | John Arthorne <john.arthorne> |
| Component: | p2 | Assignee: | Pascal Rapicault <pascal> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | irbull, pascal, thomas |
| Version: | 3.6 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
|
Description
John Arthorne
The URL Is sent to the VersionId.parse function which simply splits it into segments using '/'. Segment 0 is then assumed to be an id and segment 1 a version. We should have sanity checks:
1. The number of segments must be 1 or 2.
2. If the second segment is present, it has to be a valid version.
and then instead throw an IllegalArgumentException(NLS.bind("''$0'' is not a valid id/version", spec).
That would give the user a better hint then the current message.
Perhaps the first segment should somehow be checked for validity. But that begs the question, what is a valid IU id?
Yes the exception makes sense, this bug is really about reporting something nicer to the user. Currently I get an error dialog saying "An error has occurred. See the log file for details". Instead I should see something on stdout saying something like "{0} is not a valid version number", as you suggest.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |