#16242: assert_have_dot2tex should reraise exception not replace it
-------------------------------------+-------------------------------------
       Reporter:  slabbe             |        Owner:  slabbe
           Type:  defect             |       Status:  positive_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  packages:          |   Resolution:
  optional                           |    Merged in:
       Keywords:                     |    Reviewers:  Nathann Cohen
        Authors:  Sébastien Labbé    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  u/slabbe/16242     |  ecc5f70423cf25c566fd8f30364a3ffe295d6ad8
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by slabbe):

 > {{{
 > #!python
 > except ImportError:
 >     raise ImportError(import_error_string)
 > }}}
 > Would that be better?

 No. It is basically what it was before. It loses what creates the error.

 > (by the way, I don't think you need the "as e" part), you could do

 You are right.

 I forgot to remove it after I tried to add info in e unsuccessfully:

 {{{
 #!python
 except ImportError as e:
     e.add_info_method(import_error_string) #  <--- how to do this?
     raise e # re-raise current exception
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/16242#comment:17>
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.

Reply via email to