Skip to content
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

ValidationException has empty message #277

Open
arjank opened this issue Nov 17, 2015 · 0 comments
Open

ValidationException has empty message #277

arjank opened this issue Nov 17, 2015 · 0 comments

Comments

@arjank
Copy link

arjank commented Nov 17, 2015

When the ValidatorFilter creates a ValidationException, the exception message is left blank. That means that when the message is sent to a logger in the StepAggregator $this->logger->error($e->getMessage());, it will send an empty message. That's not very helpful when you're trying to log why an item cannot be processed.

My suggestion would be to set the message to a string that contains the line number and a comma separated list of all the constraint violations. That way the exception message makes sense, and of course you can still process the messages later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant