Can I set an error message dynamically (i.e. is there an error callback)

For the Universal Login page, I’m looking to dynamically show an error message like this:

if error is due to "wrong email or password" AND username/email is acme.com then
  errorMessageToDisplay = "Wrong email or password. Please ensure you're using your assigned email to login"

Is there a way to hook into an error event, and dynamically show an error message?