All pastes #280618 Raw Edit

Mine

public text v1 · immutable
#280618 ·published 2006-12-16 01:13 UTC
rendered paste body
    def _catchFailure(self, failure):
        exception = failure.trap(error.ConnectionRefusedError)
        print "Error: ", failure.getErrorMessage()
        print "Traceback: ", failure.printDetailedTraceback()
        if issubclass(exception, error.ConnectionRefusedError):
            log.msg('[Monitor, _catchFailure] ConnectionRefusedError')
            reactor.stop()
        else:
            log.msg('Monitor, _catchFailure] Unhandled exception')
            reactor.stop()