HomePhabricator

templater: add exception-raising version of open_template()

Authored by martinvonz.

Description

templater: add exception-raising version of open_template()

I'm about to add another caller of open_template() (in the template
loader). That caller will want to get exceptions instead of `(None,
None)` if the template doesn't exist. This patch therefore changes
open_template() to raise exceptions and adds a new
try_open_template() that returns the (None, None) value.

Differential Revision: https://phab.mercurial-scm.org/D8905