#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 slabbe):

 > If you need to change the message why don't you just raise your
 exception with a different message ?

 I want to keep the message. This is the purpose of this ticket. Changing
 the error message just hide the real problem.

 > I don't get it again : why do you both print a message THEN raise the
 exception ?

 Because it was like that before and because that printed message is
 unrelated to the purpose of the ticket. I kept the message because it just
 gives more information.

 BEFORE:
  - print error info about dot2tex    (unrelated to the goal of the ticket)
  - then raise `RunTimeError` with error info about dot2tex  (related to
 the actual ticket)

 NOW:
  - print error info about dot2tex
  - then reraise the error

 Ok maybe print statement is not clean I agree. Do you want me to fix that
 part in this ticket? But how should it be then? How to add cleanly info
 before raising an exception?

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