| |
- builtins.BaseException(builtins.object)
-
- FunctionTimedOut
class FunctionTimedOut(builtins.BaseException) |
|
FunctionTimedOut(msg='', timedOutAfter=None, timedOutFunction=None, timedOutArgs=None, timedOutKwargs=None)
FunctionTimedOut - Exception raised when a function times out
@property timedOutAfter - Number of seconds before timeout was triggered
@property timedOutFunction - Function called which timed out
@property timedOutArgs - Ordered args to function
@property timedOutKwargs - Keyword args to function
@method retry - Retries the function with same arguments, with option to run with original timeout, no timeout, or a different
explicit timeout. @see FunctionTimedOut.retry |
|
- Method resolution order:
- FunctionTimedOut
- builtins.BaseException
- builtins.object
Methods defined here:
- __init__(self, msg='', timedOutAfter=None, timedOutFunction=None, timedOutArgs=None, timedOutKwargs=None)
- __init__ - Create this exception type.
You should not need to do this outside of testing, it will be created by the func_timeout API
@param msg <str> - A predefined message, otherwise we will attempt to generate one from the other arguments.
@param timedOutAfter <None/float> - Number of seconds before timing-out. Filled-in by API, None will produce "Unknown"
@param timedOutFunction <None/function> - Reference to the function that timed-out. Filled-in by API." None will produce "Unknown Function"
@param timedOutArgs <None/tuple/list> - List of fixed-order arguments ( *args ), or None for no args.
@param timedOutKwargs <None/dict> - Dict of keyword arg ( **kwargs ) names to values, or None for no kwargs.
- getMsg(self)
- getMsg - Generate a default message based on parameters to FunctionTimedOut exception'
@return <str> - Message
- retry(self, timeout='RETRY_SAME_TIMEOUT')
- retry - Retry the timed-out function with same arguments.
@param timeout <float/RETRY_SAME_TIMEOUT/None> Default RETRY_SAME_TIMEOUT
If RETRY_SAME_TIMEOUT : Will retry the function same args, same timeout
If a float/int : Will retry the function same args with provided timeout
If None : Will retry function same args no timeout
@return - Returnval from function
Data descriptors defined here:
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from builtins.BaseException:
- __delattr__(self, name, /)
- Implement delattr(self, name).
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __reduce__(...)
- Helper for pickle.
- __repr__(self, /)
- Return repr(self).
- __setattr__(self, name, value, /)
- Implement setattr(self, name, value).
- __setstate__(...)
- __str__(self, /)
- Return str(self).
- with_traceback(...)
- Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.
Static methods inherited from builtins.BaseException:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
Data descriptors inherited from builtins.BaseException:
- __cause__
- exception cause
- __context__
- exception context
- __dict__
- __suppress_context__
- __traceback__
- args
| |