Changeset 3240

Show
Ignore:
Timestamp:
07/11/07 22:13:33 (1 year ago)
Author:
paul
Message:

Fixed eventMixin to not handle exceptions in the event handlers. This will allow
people to use global excepthooks. Thanks, Simen, for pointing out the problem.
Ticket #1080.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/lib/eventMixin.py

    r3199 r3240  
    9090                    uiCallAfterFunc(bindingFunction, event) 
    9191                else: 
     92                    bindingFunction(event) 
     93                    # Previously, we were printing any raised exception and then  
     94                    # letting it go, which just seems wrong. Commented out: 
     95 
    9296                    # Wrap the call so that if an exception is raised in one 
    9397                    # handler, the rest of the handlers still get a whack at  
     
    9599                    # the real event loop in the ui lib. This is only necessary 
    96100                    # because we aren't using a uiCallAfterFunc(). 
    97                     try: 
    98                       bindingFunction(event) 
    99                     except: 
    100                       traceback.print_exc() 
     101                    #try: 
     102                    # bindingFunction(event) 
     103                    #except: 
     104                    # traceback.print_exc() 
    101105            if not event.Continue: 
    102106                # The event handler set the Continue flag to False, specifying that