Hi Philipp, Florent [...] > > There *is* a way to check whether the error resulted from > the current > > frame or a lower frame. Introspections like these have the > tendency to > > be or become hacks, but then again, we use frame > inspections in other > > places, too. > > Yes, I was about to suggest using the standard PJE trick used > elsewhere in Zope 3 (to check for deep ImportErrors), namely: > > try: > ob() > except (TypeError, AttributeError): > if sys.exce_info()[2].tb_next is not None: > raise > # here we know the exception was not "deep" > # so the object isn't callable
Good point Regards Roger Ineichen > Florent _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com