fcs.crawler.thread_with_exc

class ThreadWithExc

Extends threading.Thread class. Used for terminating crawlers.

raise_exc(exctype)

Raises in this thread a specified type of exception.

Parameters:

exctype (object) – Exception class.

Raises:
  • TypeError – if exctype is an instance, not type (class).
  • ValueError – in case of invalid thread ID
  • SystemError – if raising exception fails