示例#1
0
def send_subprocess_error_for_exception(soft_fail=True):
    """Send a SubprocessError message after a caught exception.

    This method creates a crash report using sys.exc_info().  So it should
    only be called after an exception is caught.

    :param soft_fail: trigger a soft failure in the main process
    """
    exc_info = sys.exc_info()
    report = '---- subprocess stack ----\n'
    report += crashreport.format_stack_report('in subprocess', exc_info)
    report += '--------------------------'
    if _on_windows():
        report += "\nGetLastError(): %s" % ctypes.GetLastError()
        report += '\n--------------------------'

    SubprocessError(report, soft_fail=soft_fail).send_to_main_process()
    if logging_setup:
        logging.warn("Sending crash report to main process:\n%s", report)
示例#2
0
def send_subprocess_error_for_exception(soft_fail=True):
    """Send a SubprocessError message after a caught exception.

    This method creates a crash report using sys.exc_info().  So it should
    only be called after an exception is caught.

    :param soft_fail: trigger a soft failure in the main process
    """
    exc_info = sys.exc_info()
    report = '---- subprocess stack ----\n'
    report += crashreport.format_stack_report('in subprocess', exc_info)
    report += '--------------------------'
    if _on_windows():
        report += "\nGetLastError(): %s" % ctypes.GetLastError()
        report += '\n--------------------------'

    SubprocessError(report, soft_fail=soft_fail).send_to_main_process()
    if logging_setup:
        logging.warn("Sending crash report to main process:\n%s", report)
示例#3
0
def _send_subprocess_error_for_exception(soft_fail=True):
    exc_info = sys.exc_info()
    report = '---- subprocess stack ---- '
    report += crashreport.format_stack_report('in subprocess', exc_info)
    report += '-------------------------- '
    SubprocessError(report, soft_fail=soft_fail).send_to_main_process()
示例#4
0
def _send_subprocess_error_for_exception(soft_fail=True):
    exc_info = sys.exc_info()
    report = '---- subprocess stack ---- '
    report += crashreport.format_stack_report('in subprocess', exc_info)
    report += '-------------------------- '
    SubprocessError(report, soft_fail=soft_fail).send_to_main_process()