137 lines
10 KiB
HTML
137 lines
10 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html ><head ><title >Python: module func_timeout.exceptions</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
</head><body bgcolor="#f0f0f8" >
|
|
|
|
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="heading" >
|
|
<tr bgcolor="#7799ee" >
|
|
<td valign="bottom" > <br />
|
|
<font color="#ffffff" face="helvetica, arial" > <br /><big ><big ><strong ><a href="func_timeout.html" ><font color="#ffffff" >func_timeout</font></a>.exceptions</strong></big></big></font></td><td align="right" valign="bottom" ><font color="#ffffff" face="helvetica, arial" ><a href="func_timeout.html" >index</a></font></td></tr></table>
|
|
<p ><tt >Copyright (c) 2016 Tim Savannah All Rights Reserved.<br />
|
|
<br />
|
|
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as<br />
|
|
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE</tt></p>
|
|
<p >
|
|
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section" >
|
|
<tr bgcolor="#ee77aa" >
|
|
<td colspan="3" valign="bottom" > <br />
|
|
<font color="#ffffff" face="helvetica, arial" ><big ><strong >Classes</strong></big></font></td></tr>
|
|
|
|
<tr ><td bgcolor="#ee77aa" ><tt > </tt></td><td > </td>
|
|
<td width="100%" ><dl >
|
|
<dt ><font face="helvetica, arial" ><a href="builtins.html#BaseException" >builtins.BaseException</a>(<a href="builtins.html#object" >builtins.object</a>)
|
|
</font></dt><dd >
|
|
<dl >
|
|
<dt ><font face="helvetica, arial" ><a href="func_timeout.exceptions.html#FunctionTimedOut" >FunctionTimedOut</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
</dl>
|
|
<p >
|
|
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section" >
|
|
<tr bgcolor="#ffc8d8" >
|
|
<td colspan="3" valign="bottom" > <br />
|
|
<font color="#000000" face="helvetica, arial" ><a name="FunctionTimedOut" >class <strong >FunctionTimedOut</strong></a>(<a href="builtins.html#BaseException" >builtins.BaseException</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8" ><td rowspan="2" ><tt > </tt></td>
|
|
<td colspan="2" ><tt ><a href="#FunctionTimedOut" >FunctionTimedOut</a>(msg='', timedOutAfter=None, timedOutFunction=None, timedOutArgs=None, timedOutKwargs=None)<br />
|
|
<br />
|
|
<a href="#FunctionTimedOut" >FunctionTimedOut</a> - Exception raised when a function times out<br />
|
|
<br />
|
|
@property timedOutAfter - Number of seconds before timeout was triggered<br />
|
|
<br />
|
|
@property timedOutFunction - Function called which timed out<br />
|
|
@property timedOutArgs - Ordered args to function<br />
|
|
@property timedOutKwargs - Keyword args to function<br />
|
|
<br />
|
|
@method retry - Retries the function with same arguments, with option to run with original timeout, no timeout, or a different<br />
|
|
explicit timeout. @see <a href="#FunctionTimedOut" >FunctionTimedOut</a>.retry<br /> </tt></td></tr>
|
|
<tr ><td > </td>
|
|
<td width="100%" ><dl ><dt >Method resolution order:</dt>
|
|
<dd ><a href="func_timeout.exceptions.html#FunctionTimedOut" >FunctionTimedOut</a></dd>
|
|
<dd ><a href="builtins.html#BaseException" >builtins.BaseException</a></dd>
|
|
<dd ><a href="builtins.html#object" >builtins.object</a></dd>
|
|
</dl>
|
|
<hr />
|
|
Methods defined here:<br />
|
|
<dl ><dt ><a name="FunctionTimedOut-__init__" ><strong >__init__</strong></a>(self, msg='', timedOutAfter=None, timedOutFunction=None, timedOutArgs=None, timedOutKwargs=None)</dt><dd ><tt >__init__ - Create this exception type.<br />
|
|
<br />
|
|
You should not need to do this outside of testing, it will be created by the func_timeout API<br />
|
|
<br />
|
|
@param msg <str> - A predefined message, otherwise we will attempt to generate one from the other arguments.<br />
|
|
<br />
|
|
@param timedOutAfter <None/float> - Number of seconds before timing-out. Filled-in by API, None will produce "Unknown"<br />
|
|
<br />
|
|
@param timedOutFunction <None/function> - Reference to the function that timed-out. Filled-in by API." None will produce "Unknown Function"<br />
|
|
<br />
|
|
@param timedOutArgs <None/tuple/list> - List of fixed-order arguments ( *args ), or None for no args.<br />
|
|
<br />
|
|
@param timedOutKwargs <None/dict> - Dict of keyword arg ( **kwargs ) names to values, or None for no kwargs.</tt></dd></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-getMsg" ><strong >getMsg</strong></a>(self)</dt><dd ><tt >getMsg - Generate a default message based on parameters to <a href="#FunctionTimedOut" >FunctionTimedOut</a> exception'<br />
|
|
<br />
|
|
@return <str> - Message</tt></dd></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-retry" ><strong >retry</strong></a>(self, timeout='RETRY_SAME_TIMEOUT')</dt><dd ><tt >retry - Retry the timed-out function with same arguments.<br />
|
|
<br />
|
|
@param timeout <float/RETRY_SAME_TIMEOUT/None> Default RETRY_SAME_TIMEOUT<br />
|
|
<br />
|
|
If RETRY_SAME_TIMEOUT : Will retry the function same args, same timeout<br />
|
|
If a float/int : Will retry the function same args with provided timeout<br />
|
|
If None : Will retry function same args no timeout<br />
|
|
<br />
|
|
@return - Returnval from function</tt></dd></dl>
|
|
|
|
<hr />
|
|
Data descriptors defined here:<br />
|
|
<dl ><dt ><strong >__weakref__</strong></dt>
|
|
<dd ><tt >list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr />
|
|
Methods inherited from <a href="builtins.html#BaseException" >builtins.BaseException</a>:<br />
|
|
<dl ><dt ><a name="FunctionTimedOut-__delattr__" ><strong >__delattr__</strong></a>(self, name, /)</dt><dd ><tt >Implement delattr(self, name).</tt></dd></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-__getattribute__" ><strong >__getattribute__</strong></a>(self, name, /)</dt><dd ><tt >Return getattr(self, name).</tt></dd></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-__reduce__" ><strong >__reduce__</strong></a>(...)</dt><dd ><tt >Helper for pickle.</tt></dd></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-__repr__" ><strong >__repr__</strong></a>(self, /)</dt><dd ><tt >Return repr(self).</tt></dd></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-__setattr__" ><strong >__setattr__</strong></a>(self, name, value, /)</dt><dd ><tt >Implement setattr(self, name, value).</tt></dd></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-__setstate__" ><strong >__setstate__</strong></a>(...)</dt></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-__str__" ><strong >__str__</strong></a>(self, /)</dt><dd ><tt >Return str(self).</tt></dd></dl>
|
|
|
|
<dl ><dt ><a name="FunctionTimedOut-with_traceback" ><strong >with_traceback</strong></a>(...)</dt><dd ><tt >Exception.<a href="#FunctionTimedOut-with_traceback" >with_traceback</a>(tb) --<br />
|
|
set self.<strong >__traceback__</strong> to tb and return self.</tt></dd></dl>
|
|
|
|
<hr />
|
|
Static methods inherited from <a href="builtins.html#BaseException" >builtins.BaseException</a>:<br />
|
|
<dl ><dt ><a name="FunctionTimedOut-__new__" ><strong >__new__</strong></a>(*args, **kwargs)<font color="#909090" ><font face="helvetica, arial" > from <a href="builtins.html#type" >builtins.type</a></font></font></dt><dd ><tt >Create and return a new object. See help(type) for accurate signature.</tt></dd></dl>
|
|
|
|
<hr />
|
|
Data descriptors inherited from <a href="builtins.html#BaseException" >builtins.BaseException</a>:<br />
|
|
<dl ><dt ><strong >__cause__</strong></dt>
|
|
<dd ><tt >exception cause</tt></dd>
|
|
</dl>
|
|
<dl ><dt ><strong >__context__</strong></dt>
|
|
<dd ><tt >exception context</tt></dd>
|
|
</dl>
|
|
<dl ><dt ><strong >__dict__</strong></dt>
|
|
</dl>
|
|
<dl ><dt ><strong >__suppress_context__</strong></dt>
|
|
</dl>
|
|
<dl ><dt ><strong >__traceback__</strong></dt>
|
|
</dl>
|
|
<dl ><dt ><strong >args</strong></dt>
|
|
</dl>
|
|
</td></tr></table></p></td></tr></table><p >
|
|
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section" >
|
|
<tr bgcolor="#55aa55" >
|
|
<td colspan="3" valign="bottom" > <br />
|
|
<font color="#ffffff" face="helvetica, arial" ><big ><strong >Data</strong></big></font></td></tr>
|
|
|
|
<tr ><td bgcolor="#55aa55" ><tt > </tt></td><td > </td>
|
|
<td width="100%" ><strong >RETRY_SAME_TIMEOUT</strong> = 'RETRY_SAME_TIMEOUT'<br />
|
|
<strong >__all__</strong> = ('FunctionTimedOut', 'RETRY_SAME_TIMEOUT')</td></tr></table>
|
|
</p></p></body></html> |