Update README.md

Added usage example for setErrorMessage helper function