#11942: segfault on Graph().connected_component_containing_vertex('')
------------------------------------------+---------------------------------
Reporter: kini | Owner: jason, ncohen, rlm
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.8
Component: graph theory | Keywords: segfault cython
Work_issues: | Upstream: N/A
Reviewer: Keshav Kini, David Coudert | Author: Nathann Cohen,
Keshav Kini
Merged: | Dependencies:
------------------------------------------+---------------------------------
Comment(by kini):
`ValueError`'s constructor accepts a string representing a message, but
`KeyError`'s constructor accepts an object representing the key which was
not found in some collection. So this is the "correct" way to raise the
exception here. The traceback call stack should theoretically give you all
the info that was in the error message before. I noticed this because
`raise ValueError('foo')` gives you a message "!ValueError: foo" whereas
`raise KeyError('foo')` gives you a message "!KeyError: 'foo'" (note the
quotation marks). I asked about it on the Python IRC channel and the above
is the answer I got.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11942#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.