templater: drop global exception catcher from runfilter() (API)
authorYuya Nishihara <yuya@tcha.org>
Sun, 18 Mar 2018 16:57:07 +0900
changeset 37231 dc4bb1422f2b
parent 37230 63144f33c8bb
child 37232 15691d71da23
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.
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))