Issue Details (XML | Word | Printable)

Key: OPENJPA-176
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Marc Prud'hommeaux
Reporter: Marc Prud'hommeaux
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenJPA

Exception prefixes should be human-readable

Created: 21/Mar/07 12:15 AM   Updated: 24/Mar/07 07:38 PM
Return to search
Component/s: diagnostics
Affects Version/s: 0.9.0, 0.9.6
Fix Version/s: 0.9.7

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works OPENJPA-176.patch 2007-03-24 04:11 AM Marc Prud'hommeaux 1 kB

Resolution Date: 24/Mar/07 07:38 PM


 Description  « Hide
OpenJPA prefixes all exception messages with a string of the form "<exception type|is fatal|version>", restulting in strings like "<4|false|0.9.6-incubating> org.apache.openjpa.persistence.PersistenceException". This isn't very useful to the casual observer, since no translation of the meaning of the fields is done.

it would be nice if we translated the fatal and type parameters, so that the string looked like "<user-error|recoverable|0.9.6-incubating>".


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Marc Prud'hommeaux added a comment - 24/Mar/07 04:11 AM
The attached patch will change the prefix to look like, for example: "<0.9.6-incubating fatal user error> org.apache.openjpa.persistence.PersistenceException".

Any objections?

Craig Russell added a comment - 24/Mar/07 03:54 PM
I like it.

What if the type is not one of the expected types? Perhaps we want to identify this case? Such as "unexpected error" or something.

Michael Dick added a comment - 24/Mar/07 04:18 PM
It looks like we just use type + " error" if the type isn't recognized.

+1 as it is, but I'm not opposed to changing type + " error" to "unexpected error" or something similar.

Marc Prud'hommeaux added a comment - 24/Mar/07 07:38 PM
Implemented patch.