Bug 209520 - [prov] Taxonomy of status codes/exceptions
Summary: [prov] Taxonomy of status codes/exceptions
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Incubator (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks: 206650
  Show dependency tree
 
Reported: 2007-11-12 11:45 EST by Susan McCourt CLA
Modified: 2008-01-11 14:49 EST (History)
1 user (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 2007-11-12 11:45:04 EST
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.
Comment 1 Susan McCourt CLA 2007-12-10 11:09:59 EST
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.
Comment 2 James D. Miles CLA 2007-12-11 10:07:13 EST
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. 
Comment 3 John Arthorne CLA 2008-01-11 11:50:37 EST
I have begun adding status codes to the ProvisionException class. I will add more codes there as we refine our implementation.
Comment 4 John Arthorne CLA 2008-01-11 14:49:08 EST
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.