throw slightly more useful errors