Move passed_end inside exception handling block