]> granicus.if.org Git - python/commitdiff
Removed try/except TypeError around calling the ae handler function, it masksprogramm...
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 19 Oct 2000 20:49:12 +0000 (20:49 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 19 Oct 2000 20:49:12 +0000 (20:49 +0000)
Mac/Lib/lib-toolbox/MiniAEFrame.py

index 87726e9543daacbccfa78019ba1886096d1c5593..5f1f33ecc363be4ef9d8007a41f8ed9b93207c87 100644 (file)
@@ -146,15 +146,13 @@ class AEServer:
                if _parameters.has_key('----'):
                        _object = _parameters['----']
                        del _parameters['----']
-                       try:
-                               rv = apply(_function, (_object,), _parameters)
-                       except TypeError, name:
-                               raise TypeError, ('AppleEvent handler misses formal keyword argument', _function, name)
+                       # The try/except that used to be here can mask programmer errors.
+                       # Let the program crash, the programmer can always add a **args
+                       # to the formal parameter list.
+                       rv = apply(_function, (_object,), _parameters)
                else:
-                       try:
-                               rv = apply(_function, (), _parameters)
-                       except TypeError, name:
-                               raise TypeError, ('AppleEvent handler misses formal keyword argument', _function, name)
+                       #Same try/except comment as above
+                       rv = apply(_function, (), _parameters)
                
                if rv == None:
                        aetools.packevent(_reply, {})