Commit 62e3843c authored by Jack Jansen's avatar Jack Jansen

Removed try/except TypeError around calling the ae handler function, it...

Removed try/except TypeError around calling the ae handler function, it masksprogrammer errors and obfuscates the stacktrace. Suggested by Tattoo Mabonzo K.
parent 136815d9
......@@ -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, {})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment