[BUGFIX beta] Make setPath errors clearer.
Merge pull request #3951 from rjackson/make_set_errors_better

[BUGFIX beta] Make setPath errors clearer.