Bug 220624 - [core] Consider providing API message strings for the status codes in ProvisionException
Summary: [core] Consider providing API message strings for the status codes in Provisi...
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2008-02-27 13:27 EST by Susan McCourt CLA
Modified: 2008-09-11 12:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2008-02-27 13:27:56 EST
ProvisionException now includes some standard status codes for repository errors (and will evolve to include more)...

As it is right now, callers who are constructing a ProvisionException (or associated IStatus) can use these codes, but have to construct their own status messages.  This could result in the same kind of error being reported slightly differently to the user.  

I think it's of particular concern because some of these messages are generated from repository factories, and a particular repository provider might choose to use implementation specific verbage that would confuse a user.  So imagine a user entering an invalid repo location and instead of always being told "invalid repo location" in the error dialog, they get something like "the foo marker is missing from the bar repo file" or "could not find superrepo.xml" or whatever....

If we don't do this at the ProvisionException/core level, then the UI will probably have to check all the status codes and do it, which means we're defining a lot of strings in the core that will never get used.
Comment 1 John Arthorne CLA 2008-09-09 11:38:10 EDT
I'm not convinced we need to do anything here. The repo managers currently return standard exception messages and codes regardless of the repository implementation that fails under the covers (see the #failStatus method on both repository managers).  Exceptions from the repository implementations are currently only logged. I'm going to close, but please reopen if you see places where we are having to duplicate messages, and we can figure out the best approach to solving it.
Comment 2 Susan McCourt CLA 2008-09-11 12:46:11 EDT
>I'm not convinced we need to do anything here. The repo managers currently
>return standard exception messages and codes regardless of the repository
>implementation that fails under the covers 

Yes, either this has been fixed since I opened the bug or else I didn't realize that the repo manager is swallowing the exceptions thrown by the repo implementations.  It's good.