Community
Participate
Working Groups
One complaint about the current update manager is that it reports errors that the user doesn't understand. We are doing the same thing in p2, since we are just passing the exceptions/status objects to the platform status handler code. We should consider having categories of errors so that the UI can map an exception/error to a more meaningful explanation for the user rather than just showing the internal status message. Bug 206650 covers the UI side of this.
From a duplicate bug: From a core point of view, we may want to be more precise about the error message returned (when an add repo fails). For example, we may want to distinguish from an error contacting the host, a bug while parsing the file, the absence of a known repo file, etc.
We are also propagating the wrong errors (at least it appeared that way to me when reading the code). Unhandled null pointers propagate as uncaught exceptions. This was one of the biggest areas we found in the update.core.
I have begun adding status codes to the ProvisionException class. I will add more codes there as we refine our implementation.
I'm going to mark this fixed, and we can continue to add further status codes and categories as needed. Although it breaks our modularity story, I prefer keeping the bulk of the status codes in a single place rather than scattering them throughout the dozen or so main p2 plugins. It doesn't add any noticeable bulk to p2.core, and in some cases the codes will be general enough to reuse in multiple places.