improve error message when a version spec is invalid.