This code might be neater if you removed this variable and used assert_unreached in the catch block.