replace exception -> template