Christian Heimes added the comment:

Amaury:
PyPy doesn't handle exceptions in hooks. Is there a reason why PyPy goes for 
the simplistic approach?

Richard:
An error callback has the benefit that the API can notice the hooks that some 
error has occurred. We may not need it, though.

I can think of six exception scenarios that must be handled:

(1) exception in a prepare hook -> don't call the remaining prepare hooks, run 
all related parent hooks in FILO order, prevent fork() call
(2) exception in parent hook during the handling of (1) -> print exception, 
continue with next parent hook
(3) exception in fork() call -> run parent hooks in FILO order
(4) exception in parent hook during the handling of (3) -> print exception, 
continue with next parent hook
(5) exception in parent hook when fork() has succeeded -> print exception, 
continue with next parent hook
(6) exception in child hook when fork() has succeeded  -> print exception, 
continue with next child hook

Do you agree?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16500>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to