class documentation
class ErrorCapturingThread(Thread): (source)
Constructor: ErrorCapturingThread(group, target, args, kwargs, daemon)
Subclass of Thread that captures exceptions from the target function.
It wraps the target function in a try-except block.
Execution will stop with an unhandled exception, but the exception will not be raised until the join method is called. When the join method is called, the exception is called in the calling thread.
This allows for error handling to be performed by the calling thread at the time that join is run.
| Method | __init__ |
Initialise with the same arguments as Thread. |
| Method | join |
Join when the thread is complete. |
| Instance Variable | _error |
Undocumented |