Skip to content
Snippets Groups Projects
Commit 4497109b authored by Bert Palm's avatar Bert Palm 🎇
Browse files

fixed error message. do not show memory location. added flagForceFail()

parent 1f5bb065
No related branches found
No related tags found
2 merge requests!193Release 1.4,!188Release 1.4
Pipeline #5720 passed with stage
in 6 minutes and 45 seconds
......@@ -30,7 +30,7 @@ def _handleErrors(exc, func, field, policy):
if func.lineno is not None and func.expr is not None:
msg += f"Config line {func.lineno}: '{func.expr}', "
else:
msg += f"Function: '{func.func}', parameters: '{func.kwargs}', "
msg += f"Function: {func.func.__name__ }(), parameters: '{func.kwargs}', "
msg += f"Exception:\n{type(exc).__name__}: {exc}"
if policy == "ignore":
......
......@@ -290,6 +290,13 @@ def flagDummy(data, field, flagger, **kwargs):
return data, flagger
@register
def flagForceFail(data, field, flagger, **kwargs):
""" Raise a RuntimeError. """
raise RuntimeError("Works as expected :D")
return data, flagger
@register
def flagManual(data, field, flagger, mdata, mflag: Any = 1, method="plain", **kwargs):
""" Flag data by given manual data.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment