Class n.l.attempt(defer.Deferred):

Part of nevow.livepage View Source View In Hierarchy

Attempt to do 'stuff' in the browser. callback on the server
if 'stuff' executes without raising an exception. errback on the
server if 'stuff' raises a JavaScript exception in the client.

Used like this:

def printIt(what):
    print "Woo!", what

C = IClientHandle(ctx)
C.send(
    attempt(js("1+1")).addCallback(printIt))

C.send(
    attempt(js("thisWillFail")).addErrback(printIt))

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
616 Method __init__ Undocumented

Inherited from Deferred:

Line # Kind Name Docs
168 Method addCallbacks Add a pair of callbacks (success and error) to this Deferred.
185 Method addCallback Convenience method for adding just a callback.
193 Method addErrback Convenience method for adding just an errback.
202 Method addBoth Convenience method for adding a single callable as both a callback
212 Method chainDeferred Chain another Deferred to this Deferred.
229 Method callback Run all success callbacks that have been added to this Deferred.
242 Method errback Run all error callbacks that have been added to this Deferred.
264 Method pause Stop processing on a Deferred until unpause() is called.
270 Method unpause Process all callbacks made since pause() was called.
342 Method setTimeout Set a timeout function to be triggered if I am not called.
367 Method __str__ Undocumented
Line # Kind Name Docs
616 Method __init__ Undocumented
367 Method __str__ Undocumented
202 Method addBoth Convenience method for adding a single callable as both a callback
185 Method addCallback Convenience method for adding just a callback.
168 Method addCallbacks Add a pair of callbacks (success and error) to this Deferred.
193 Method addErrback Convenience method for adding just an errback.
229 Method callback Run all success callbacks that have been added to this Deferred.
212 Method chainDeferred Chain another Deferred to this Deferred.
242 Method errback Run all error callbacks that have been added to this Deferred.
264 Method pause Stop processing on a Deferred until unpause() is called.
342 Method setTimeout Set a timeout function to be triggered if I am not called.
270 Method unpause Process all callbacks made since pause() was called.
def __init__(self, stuff): (source)
Undocumented
API Documentation for Nevow, generated by pydoctor.