This is an archive of the discontinued Mercurial Phabricator instance.

templater: add exception-raising version of open_template()
ClosedPublic

Authored by martinvonz on Aug 6 2020, 2:29 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.