I like the former error message which also shows how the parameter was specified..  consider adding the $name in the message again?