Minor fix in exception handling in SQLTemplateManager