| Summary: | Usability Issue - Improve Error Message when incorrect value set on property | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Blaise Doughan <blaise.doughan> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | saurabh.arora | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Blaise Doughan
Some users are finding the following error message "unfriendly": [EclipseLink-3001] (Eclipse Persistence Services - 1.1.1.v20090430-r4097): org.eclipse.persistence.exceptions.ConversionExceptionException Description: The object [45!@#6], of class [class java.lang.String], could not be converted to [class java.lang.Long].Internal Exception: java.lang.NumberFormatException: For input string: "45!@#6" We could enhance this error message to something like: Exception [EclipseLink-45041] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.SDOException Exception Description: The value [invalidNumber] of class [class java.lang.String] is invalid for property [salary] of type [commonj.sdo#Int]. Internal Exception: Exception [EclipseLink-3001] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.ConversionException Exception Description: The object [invalidNumber], of class [class java.lang.String], could not be converted to [class java.lang.Integer]. Internal Exception: java.lang.NumberFormatException: For input string: "invalidNumber" at org.eclipse.persistence.exceptions.SDOException.invalidPropertyValue(SDOException.java:329) at org.eclipse.persistence.sdo.SDODataObject.convertValueAndSet(SDODataObject.jav a:2114) at org.eclipse.persistence.sdo.SDODataObject.setString(SDODataObject.java:1094) at demo.Demo.main(Demo.java:16) Caused by: Exception [EclipseLink-3001] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.ConversionException Exception Description: The object [invalidNumber], of class [class java.lang.String], could not be converted to [class java.lang.Integer]. Internal Exception: java.lang.NumberFormatException: For input string: "invalidNumber" Created attachment 179222 [details]
Patch for providing better Error message.
Code checked into trunk at rev: 8319 Code reviewed by: Blaise Doughan The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |