more work on #1790: better error checking