Description
Razvan Popian opened SPR-16372 and commented
It would be nice if the org.springframework.validation.FieldError class would provide access to the actual exception that triggered the binding error. That exception might be thrown in a Converter or Formatter and it could be helpful for somebody who is trying to get more details about why a certain field failed to bind.
Currently the org.springframework.validation.FieldError class does store the exception message, but it would be better if it would store the actual exception (See the org.springframework.validation.DefaultBindingErrorProcessor#processPropertyAccessException method).
There are definetely workarrounds to achieve this by extending FieldError and by injecting a custom BindingErrorProcessor in the DataBinder, but I think it would be nice if the framework would do this out of the box.
Affects: 4.3.6
Issue Links:
- Cannot create BindStatus for valid field on immutable form object in case of bind errors [SPR-16449] #20994 Cannot create BindStatus for valid field on immutable form object in case of bind errors
Referenced from: pull request #1654