E&S CVS Commit: PyProtocols - Rationalize error handling such that ``combine()`` doesn't throw dispatch

pje at eby-sarna.com pje at eby-sarna.com
Wed Feb 16 07:28:00 EST 2005


Module Name:	PyProtocols
Committed By:	pje
Date:		Wed Feb 16 12:27:00 UTC 2005

Modified Files:
	PyProtocols/src/dispatch: _speedups.c _speedups.pyx combiners.py
	    combiners.txt functions.py interfaces.py strategy.py
	PyProtocols/src/protocols/tests: test_dispatch.py

Log Message:
Rationalize error handling such that ``combine()`` doesn't throw dispatch
errors.  Instead, a combiner can return an instance of the error it wants
thrown when that combinatin is used.  This allows routines to inspect
``next_method`` to see if it's a dispatch error instance, and will also
help with GraphViz generation later on (because missing and ambiguous items
will have a node in the dispatch tree now, where the old approach would
never successfully create such nodes due to ``combine()`` raising errors).


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/_speedups.c.diff?r1=1.1&r2=1.2
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/_speedups.pyx.diff?r1=1.1&r2=1.2
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/combiners.py.diff?r1=1.3&r2=1.4
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/combiners.txt.diff?r1=1.6&r2=1.7
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/functions.py.diff?r1=1.34&r2=1.35
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/interfaces.py.diff?r1=1.13&r2=1.14
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/strategy.py.diff?r1=1.25&r2=1.26
http://cvs.eby-sarna.com/PyProtocols/src/protocols/tests/test_dispatch.py.diff?r1=1.37&r2=1.38

To generate a diff of this commit:
cvs rdiff -r1.1 -r1.2 PyProtocols/src/dispatch/_speedups.c \
    PyProtocols/src/dispatch/_speedups.pyx
cvs rdiff -r1.3 -r1.4 PyProtocols/src/dispatch/combiners.py
cvs rdiff -r1.6 -r1.7 PyProtocols/src/dispatch/combiners.txt
cvs rdiff -r1.34 -r1.35 PyProtocols/src/dispatch/functions.py
cvs rdiff -r1.13 -r1.14 PyProtocols/src/dispatch/interfaces.py
cvs rdiff -r1.25 -r1.26 PyProtocols/src/dispatch/strategy.py
cvs rdiff -r1.37 -r1.38 PyProtocols/src/protocols/tests/test_dispatch.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list