diff --git a/funcy/flow.py b/funcy/flow.py index 85c5a8e..8d7cfff 100644 --- a/funcy/flow.py +++ b/funcy/flow.py @@ -46,9 +46,9 @@ def wrapper(*args, **kwargs): return wrapper return decorator -def silent(func): +def silent(func, default=None): """Alters function to ignore all exceptions.""" - return ignore(Exception)(func) + return ignore(Exception, default=default)(func) ### Backport of Python 3.7 nullcontext