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?

Marc Prud'hommeaux made changes - 24/Mar/07 04:11 AM
Field Original Value New Value
Attachment OPENJPA-176.patch [ 12354139 ]
Marc Prud'hommeaux made changes - 24/Mar/07 04:47 AM
Assignee Marc Prud'hommeaux [ mprudhom ]
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.

Repository Revision Date User Message
ASF #522097 Sat Mar 24 19:37:32 UTC 2007 mprudhom OPENJPA-176 Made the stringified exception prefixes scrutable.
Files Changed
MODIFY /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java

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

Marc Prud'hommeaux made changes - 24/Mar/07 07:38 PM
Resolution Fixed [ 1 ]
Fix Version/s 0.9.7 [ 12312340 ]
Status Open [ 1 ] Resolved [ 5 ]