Definition at line 1503 of file Utils.py.
◆ __init__()
def app.Utils.InterruptableThread.__init__ |
( |
|
self, |
|
|
|
func, |
|
|
|
args, |
|
|
|
kwargs, |
|
|
|
default, |
|
|
|
log |
|
) |
| |
Definition at line 1508 of file Utils.py.
1508 def __init__(self, func, args, kwargs, default, log):
1509 threading.Thread.__init__(self)
1510 self.function = func
1512 self.kwargs = kwargs
1513 self.result = default
1515 self.errorCode = self.ERROR_CODE_OK
1516 self.errorMessage =
'' 1517 self.errorException = Exception(
'Dummy exception')
def __init__(self)
constructor
◆ run()
def app.Utils.InterruptableThread.run |
( |
|
self | ) |
|
Definition at line 1518 of file Utils.py.
1520 self.result = self.function(*self.args, **self.kwargs)
1521 except Exception, err:
1522 if self.logger
is not None:
1523 self.logger.
error(
"Error of execution of thread class InterruptableThread(): %s\nargs: %s",
1524 str(err), str(self.args))
1525 self.errorCode = self.ERROR_CODE_APPLIED_EXCEPTION
1526 self.errorMessage = str(err)
1527 self.errorException = err
1530 self.errorCode = self.ERROR_CODE_GENERAL_EXCEPTION
1531 self.errorMessage =
'Undefined error of execution of thread class InterruptableThread(), args: ' + str(self.args)
1532 if self.logger
is not None:
1533 self.logger.
error(self.errorMessage)
◆ args
app.Utils.InterruptableThread.args |
◆ ERROR_CODE_APPLIED_EXCEPTION
int app.Utils.InterruptableThread.ERROR_CODE_APPLIED_EXCEPTION = 2 |
|
static |
◆ ERROR_CODE_GENERAL_EXCEPTION
int app.Utils.InterruptableThread.ERROR_CODE_GENERAL_EXCEPTION = 1 |
|
static |
◆ ERROR_CODE_OK
int app.Utils.InterruptableThread.ERROR_CODE_OK = 0 |
|
static |
◆ errorCode
app.Utils.InterruptableThread.errorCode |
◆ errorException
app.Utils.InterruptableThread.errorException |
◆ errorMessage
app.Utils.InterruptableThread.errorMessage |
◆ function
app.Utils.InterruptableThread.function |
◆ kwargs
app.Utils.InterruptableThread.kwargs |
◆ logger
app.Utils.InterruptableThread.logger |
◆ result
app.Utils.InterruptableThread.result |
The documentation for this class was generated from the following file: