Raise error if a template doesn't exist.