Did I find the right examples for you? yes no

All Samples(2256)  |  Call(2210)  |  Derive(0)  |  Import(46)
Write a failure to the log.

The C{_stuff} and C{_why} parameters use an underscore prefix to lessen
the chance of colliding with a keyword argument the application wishes
to pass.  It is intended that they be supplied with arguments passed
positionally, not by keyword.

@param _stuff: The failure to log.  If C{_stuff} is C{None} a new
    L{Failure} will be created from the current exception state.  If
    C{_stuff} is an C{Exception} instance it will be wrapped in a(more...)

        def err(_stuff=None, _why=None, **kw):
    """
    Write a failure to the log.

    The C{_stuff} and C{_why} parameters use an underscore prefix to lessen
    the chance of colliding with a keyword argument the application wishes
    to pass.  It is intended that they be supplied with arguments passed
    positionally, not by keyword.

    @param _stuff: The failure to log.  If C{_stuff} is C{None} a new
        L{Failure} will be created from the current exception state.  If
        C{_stuff} is an C{Exception} instance it will be wrapped in a
        L{Failure}.
    @type _stuff: C{NoneType}, C{Exception}, or L{Failure}.

    @param _why: The source of this failure.  This will be logged along with
        C{_stuff} and should describe the context in which the failure
        occurred.
    @type _why: C{str}
    """
    if _stuff is None:
        _stuff = failure.Failure()
    if isinstance(_stuff, failure.Failure):
        msg(failure=_stuff, why=_why, isError=1, **kw)
    elif isinstance(_stuff, Exception):
        msg(failure=failure.Failure(_stuff), why=_why, isError=1, **kw)
    else:
        msg(repr(_stuff), why=_why, isError=1, **kw)
        


src/u/d/udplog-0.1.1/doc/examples/twisted_logging.py   udplog(Download)
        print a['something']
    except:
        log.err(None, "Oops!")
 
    warnings.warn("Don't do foo, do bar instead!", stacklevel=2)

src/o/h/oh-mainline-HEAD/vendor/packages/twisted/doc/mail/examples/imap4client.py   oh-mainline(Download)
def ebConnection(reason):
    log.startLogging(sys.stdout)
    log.err(reason)
    from twisted.internet import reactor
    reactor.stop()

src/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/Twisted/doc/mail/examples/imap4client.py   hortonworks-sandbox(Download)
def ebConnection(reason):
    log.startLogging(sys.stdout)
    log.err(reason)
    from twisted.internet import reactor
    reactor.stop()

src/t/w/Twisted-13.2.0/doc/mail/examples/imap4client.py   Twisted(Download)
    """
    log.startLogging(sys.stdout)
    log.err(reason)
    return reason
 

src/r/e/restmq-HEAD/examples/mapreduce/reduce.py   restmq(Download)
				data.append(json.loads(line))
        except Exception, e:
            log.err("cannot decode json: %s" % str(e))
            log.err("json is: %s" % content)
        else:

src/q/u/quebert-0.0.5/examples/med.py   quebert(Download)
    def onConnectionError(e):
        log.err(e)
 
    client = amqp.TxAMQPClient(host, username, password,
                               watcherFactory=DelayOnErrorWatcher)
                watcher = yield d
            except Exception, e:
                log.err(e)
 
            m = mediator.Mediator()

src/r/e/restmq-HEAD/examples/test_comet.py   restmq(Download)
    def write(self, content):
        try:
            data = json.loads(content)
        except Exception, e:
            log.err("cannot decode json: %s" % str(e))
            log.err("json is: %s" % content)

src/r/e/restmq-HEAD/examples/test_collectd.py   restmq(Download)
                    data = data.get('value')
            except Exception, e:
                log.err("cannot decode json: %s" % str(e))
                log.err("json is: %s" % content)
            else:

src/r/e/restmq-HEAD/examples/mapreduce/reduce_keyfreq.py   restmq(Download)
				data.append(json.loads(line))
        except Exception, e:
            log.err("cannot decode json: %s" % str(e))
            log.err("json is: %s" % content)
        else:

src/e/v/eventsocket-HEAD/examples/mwi.py   eventsocket(Download)
        client = yield factory.ready
    except Exception, e:
        log.err("cannot connect: %s" % e)
        defer.returnValue(None)
 
    try:
        result = yield client.mwi('1000')
        log.msg(result)
    except Exception, e:
        log.err()

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next