changeset 37231:dc4bb1422f2b

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.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 18 Mar 2018 16:57:07 +0900
parents 63144f33c8bb
children 15691d71da23
files mercurial/templateutil.py
diffstat 1 files changed, 0 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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))