[tor-commits] [tor/master] Refactor the assertion-failure code into a function