def _generate_error_result(exc, message):
        """
        :param exc: Raised exception.
        :type exc: Exception.

        :param message: Error message which will be prefixed to the exception exception message.
        :type message: ``str``
        """
        exc_message = getattr(exc, "message", str(exc))
        error_message = "%s %s" % (message, exc_message)
        traceback_message = traceback.format_exc()

        if isinstance(exc, SSHCommandTimeoutError):
            return_code = -9
            timeout = True
        else:
            timeout = False
            return_code = 255

        stdout = getattr(exc, "stdout", None) or ""
        stderr = getattr(exc, "stderr", None) or ""

        error_dict = {
            "failed": True,
            "succeeded": False,
            "timeout": timeout,
            "return_code": return_code,
            "stdout": stdout,
            "stderr": stderr,
            "error": error_message,
            "traceback": traceback_message,
        }
        return error_dict

        :param exc: Raised exception.
        :type exc: Exception.

        :param message: Error message which will be prefixed to the exception exception message.
        :type message: ``str``
        
st2common/st2common/runners/parallel_ssh.py