code: def exception(self):
          
          if self._exception is not None:
              return self._exception
          try:
              exc, tblines = self.exc_queue.get_nowait()
          except Empty:
              self._exception, self.tb_lines = None, None
          else:
              # Raise any exception that the subprocess encountered and sent.
              self._exception, self.tb_lines = exc, tblines
          return self._exception
docs: Try retrieving the last subprocess exception.
              If set, the exception is returned. Otherwise None is returned.