More informative error message. Fixes #638
Merge remote-tracking branch 'kovidgoyal/fix-638' into develop