Misc errors when errors happen

When things go really wrong, a lot more things also go wrong.

(NB this builds on #83 at present, so merge that first.)