diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-10-19 20:49:12 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-10-19 20:49:12 (GMT) |
commit | 62e3843ca7481754718600134e060d4e12ffd4ed (patch) | |
tree | ba9a87da934b168b503c5d3628b23551063bc0d8 /Mac | |
parent | 136815d939917ce36c2c6373028ccbf1889555bd (diff) | |
download | cpython-62e3843ca7481754718600134e060d4e12ffd4ed.zip cpython-62e3843ca7481754718600134e060d4e12ffd4ed.tar.gz cpython-62e3843ca7481754718600134e060d4e12ffd4ed.tar.bz2 |
Removed try/except TypeError around calling the ae handler function, it masksprogrammer errors and obfuscates the stacktrace. Suggested by Tattoo Mabonzo K.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Lib/lib-toolbox/MiniAEFrame.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Mac/Lib/lib-toolbox/MiniAEFrame.py b/Mac/Lib/lib-toolbox/MiniAEFrame.py index 87726e9..5f1f33e 100644 --- a/Mac/Lib/lib-toolbox/MiniAEFrame.py +++ b/Mac/Lib/lib-toolbox/MiniAEFrame.py @@ -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, {}) |