Wrapper that calls the converted version of f.
(*args, **kwargs)
| 225 | """Decorator implementation.""" |
| 226 | |
| 227 | def wrapper(*args, **kwargs): |
| 228 | """Wrapper that calls the converted version of f.""" |
| 229 | options = converter.ConversionOptions( |
| 230 | recursive=recursive, |
| 231 | user_requested=user_requested, |
| 232 | optional_features=optional_features) |
| 233 | try: |
| 234 | return converted_call(f, options, args, kwargs) |
| 235 | except Exception as e: # pylint:disable=broad-except |
| 236 | if hasattr(e, 'ag_error_metadata'): |
| 237 | raise e.ag_error_metadata.to_exception(e) |
| 238 | else: |
| 239 | raise |
| 240 | |
| 241 | if inspect.isfunction(f) or inspect.ismethod(f): |
| 242 | wrapper = functools.update_wrapper(wrapper, f) |
nothing calls this directly
no test coverage detected