# HG changeset patch # User Yuya Nishihara # Date 1521359827 -32400 # Node ID dc4bb1422f2bed6cef050349ba17b8f7ef577720 # Parent 63144f33c8bb7171059e11eb5d69a1e910cdebbc templater: drop global exception catcher from runfilter() (API) Now all built-in template filters declare input data types or handle type errors by themselves. .. api:: Template filters should declare input data type and/or catch AttributeError, ValueError, TypeError, etc. as needed. See the doc of ``registrar.templatefilters`` for details. diff -r 63144f33c8bb -r dc4bb1422f2b mercurial/templateutil.py --- a/mercurial/templateutil.py Sun Mar 18 16:53:08 2018 +0900 +++ b/mercurial/templateutil.py Sun Mar 18 16:57:07 2018 +0900 @@ -428,8 +428,6 @@ try: thing = unwrapastype(thing, getattr(filt, '_intype', None)) return filt(thing) - except (ValueError, AttributeError, TypeError): - raise error.Abort(_formatfiltererror(arg, filt)) except error.ParseError as e: raise error.ParseError(bytes(e), hint=_formatfiltererror(arg, filt))