3
# Copyright (c) 2009 Twisted Matrix Laboratories.
4
# See LICENSE for details.
6
from twisted.spread import pb
7
from twisted.internet import reactor
10
factory = pb.PBClientFactory()
11
reactor.connectTCP("localhost", 8800, factory)
12
d = factory.getRootObject()
13
d.addCallbacks(got_obj)
17
# change "broken" into "broken2" to demonstrate an unhandled exception
18
d2 = obj.callRemote("broken")
19
d2.addCallback(working)
23
print "erm, it wasn't *supposed* to work.."
26
print "got remote Exception"
27
# reason should be a Failure (or subclass) holding the MyError exception
28
print " .__class__ =", reason.__class__
29
print " .getErrorMessage() =", reason.getErrorMessage()
30
print " .type =", reason.type