#16242: assert_have_dot2tex should reraise exception not replace it
-------------------------------------+-------------------------------------
Reporter: slabbe | Owner: slabbe
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: packages: | Resolution:
optional | Merged in:
Keywords: | Reviewers:
Authors: Sébastien Labbé | Work issues:
Report Upstream: N/A | Commit:
Branch: u/slabbe/16242 | ecc5f70423cf25c566fd8f30364a3ffe295d6ad8
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
I don't get what this patch does. Why do you remove the whole file ? If
you only want to intercept a specific import error, why don't you do
something like that instead ?
{{{
sage: def raise_an_error(msg):
....: raise ImportError(msg)
sage: try:
....: raise_an_error("Hello !")
....: except ImportError as E:
....: if E.message == "Hello !":
....: print "got it !"
....:
got it !
sage: try:
....: raise_an_error("Hey !")
....: except ImportError as E:
....: if E.message == "Hello !":
....: print "got it !"
}}}
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/16242#comment:5>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.