Merge pull request #17964 from carols10cents/improve-after-commit-argumenterror-message

Make error message clearer that :on requires a symbol, not a string