In article <eShF6.9372$4N4.2100678 at newsc.telia.net>, "Fredrik Lundh" <fredrik at pythonware.com> wrote: > Bruce Edge wrote: >> Can one associate an exception handler with all member functions of a >> class without explicitly coding it in every member? > > how about: > >> class wrap: >> def __init__(self): >> self.resolve() >> >> def resolve(self) >> #resolve corba reference > > def do(self, func, args): > try: > return apply(func, args) > except omniORB.CORBA.COMM_FAILURE > self.resolve() > return apply(func, args) > > def read(self, ...) > return self.do(corba.read, (...)) > > def write(self, ...) > return self.do(corba.write, (...)) > > Cheers /F > > Hey good idea, that works for me. Thanks. -Bruce.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4