Esempio n. 1
0
 def handle_config_error(fail):
     if fail.check(UnknownConfigError):
         self.stderr.write("\nConfiguration error:\n{}\n\n".format(fail.value))
     else:
         self.stderr.write("\nUnknown error\n")
         fail.printTraceback(self.stderr)
     reactor.stop()
def failure_format_traceback(fail):
    """
    :param fail: must be an IFailedFuture
    returns a string
    """
    try:
        f = six.StringIO()
        fail.printTraceback(file=f)
        return f.getvalue()
    except Exception:
        return u"Failed to format failure traceback for '{0}'".format(fail)
Esempio n. 3
0
def failure_format_traceback(fail):
    """
    :param fail: must be an IFailedFuture
    returns a string
    """
    try:
        f = six.StringIO()
        fail.printTraceback(file=f)
        return f.getvalue()
    except Exception:
        return u"Failed to format failure traceback for '{0}'".format(fail)