executes the given function, catches all exceptions and converts to a warning.
(func: Callable[..., Any], *args: Any, **kwargs: Any)
| 1832 | |
| 1833 | |
| 1834 | def warn_exception(func: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: |
| 1835 | """executes the given function, catches all exceptions and converts to |
| 1836 | a warning. |
| 1837 | |
| 1838 | """ |
| 1839 | try: |
| 1840 | return func(*args, **kwargs) |
| 1841 | except Exception: |
| 1842 | warn("%s('%s') ignored" % sys.exc_info()[0:2]) |
| 1843 | |
| 1844 | |
| 1845 | def ellipses_string(value, len_=25): |