[tor-commits] [tor/maint-0.4.0] Fix some error-checking logic and a misleading error message