Issue 4715 better errors for bindings

r? @pcwalton