Closed pkalwar closed 8 years ago
Ok, "Hound Dog" had replied.
yes, this could have been done with custom cell-processor, but overriding 5-6 type of processors (for now, but who knows later), just for a custom message seems overkill, where as the cell-processor constructor could accept a msg instead, and be kept in the base processor, or so.
Localized message problem could also be solved to some extent: while creating cell-processors, code would know the user's locale, and read the resource bundles itself and set appropriate msg into the processor - done..
I don't see the sanity in infering the locale of files based on the current locale. However, it may be a nice idea with configuration-based exception messages. You are welcome to send a PR with the necesarry changes.
Generally, the idea with internationalizing does not sound bad but I do not see bigger benefits of it. The one reason which I see when I need internationalizing it is propagating exception message to user interface. Does it your case, @pkalwar ?
Of course, PR is always welcomed.
@pkalwar are you interested in supplying a PR or can we close this issue?
@kbilsted i have deferred the idea of having custom msg for now. But if i badly need it later, i'll see to implement it. Thanks.
closing. If any one have strong feelings towards doing this please re-open.
Is it possible to have a custom error msg attached to a cell-processor, so when it fails validation, we get our custom msg in the exception?
I had opened a stackOverflow Q also: http://stackoverflow.com/questions/32075090/custom-error-message-for-a-cell-processor-in-supercsv