# HG changeset patch # User Yuya Nishihara # Date 2018-03-18 07:57:07 # 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 --git a/mercurial/templateutil.py b/mercurial/templateutil.py --- a/mercurial/templateutil.py +++ b/mercurial/templateutil.py @@ -428,8 +428,6 @@ def runfilter(context, mapping, data): 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))