Throw an exception in case of unknown template.