-
Notifications
You must be signed in to change notification settings - Fork 684
Remove punctuation in Exception messages #2603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hallo, I could do this issue. Is it still needed? |
Yes; thank you! If you have questions or need assistance, please post in the comments here. It should be a relatively simple development task though. |
Hallo again. I just wanted to make sure that I'm fulfilling the right task. @jxblum : You want to remove have all punctuation( .;-! etc. ) at the end of all exception messages including the "test-directory", right? |
For cases like:
The removal of the punctuation seems not useful here, since there is something else added at the end. |
hallo, finishing the first part of the changes. Am I missing something? Do you create the remote branch? Sorry for the inconvenience |
Regarding...
Yes This...
Can be changed to this...
The Lastly, involving...
In your local topic branch, after you have pushed up to your clone, you can then create PR and submit the changes using the Pull Request process. Thanks. |
Hallo and thanks to @jxblum for the great support. I created a fork as a personal project and added the pull request. I checked all instantiations of the occurring exceptions, including messages which are created in advance. Hopefully I did not miss any. The PR is ready for review now. |
I saw your PR and will review tomorrow (I was on PTO today). Thank you for your contribution! It is very much appreciated. |
@jxblum @aml8801 I am not sure this was correctly implemented. For example the following message before (2.5.x) looked like this: No separation between two sentences and doubled quotes for second field name. |
@martinsefcik - Thank you for bringing this to our attention. It would appear that this is the affected area of code and it could do with some more refactoring. What we would be shooting for in this message is:
I will look into this. |
A message like, "No property 'creat' found for type 'User' Did you mean ''created''" is now properly formatted as: "No property 'creat' found for type 'User'; Did you mean 'created'". Closes spring-projectsgh-2603.
A message like, "No property 'creat' found for type 'User' Did you mean ''created''" is now properly formatted as: "No property 'creat' found for type 'User'; Did you mean 'created'". Closes spring-projectsgh-2603.
See #2750 for resolution details. |
A message like, "No property 'creat' found for type 'User' Did you mean ''created''" is now properly formatted as: "No property 'creat' found for type 'User'; Did you mean 'created'". Closes spring-projectsgh-2603.
A message like, "No property 'creat' found for type 'User' Did you mean ''created''" is now properly formatted as: "No property 'creat' found for type 'User'; Did you mean 'created'". Closes spring-projectsgh-2603.
A message like, "No property 'creat' found for type 'User' Did you mean ''created''" is now properly formatted as: "No property 'creat' found for type 'User'; Did you mean 'created'". Closes spring-projectsgh-2603.
For prior art see: spring-projects/spring-data-commons#2603 Closes #548
For prior art see: spring-projects/spring-data-commons#2603 Closes #548
Many Exception messages contain exclamation marks (!) at the end of the Exception message, for example:
While this alerts the user to an immediate problem in his/her code, it could be construed as abrasive.
Additionally, using any form of punctuation in Exception messages is not conducive for chaining. Generally, in Java Exception/Error (Throwable) chaining, the messages from the underlying Exceptions (causes) are chained together with the outer, wrapping Exception, for example:
That is, the Exception messages from the chain are appended and separated by the
;
.If the messages from the wrapping Exceptions in the Exception chain contain punctuation, then it can lead to confusing text:
The text was updated successfully, but these errors were encountered: