Changes between Initial Version and Version 1 of Ticket #11812


Ignore:
Timestamp:
Sep 18, 2011, 9:26:59 AM (11 years ago)
Author:
Marco Streng
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11812 – Description

    initial v1  
    4949}}}
    5050
    51 The cause of the problem was pinpointed by Cornado PLG and he gives the following fix:
     51Then to find the bug using this traceback, I would need to search my
     52files to find all functions named "function_with_common_name" that are
     53called from functions named "foo" for a line that could cause a division
     54by zero...
     55
     56The cause of the problem was pinpointed by Conrado PLG and he gives the following fix:
    5257
    5358Search preparser.py for {{{elif fpath.endswith('.sage')}}} and change to the code below:
     
    6166}}}
    6267
     68After that change, the traceback contains the information that I want:
     69{{{
     70/Users/marcostreng/tmp/foo.sage.py in foo()
     71     10 def foo():
     72     11      # lots of lines of code
     73     12      a = Bar()
     74---> 13      a.function_with_common_name()
     75     14      # lots of lines of code
     76
     77/Users/marcostreng/tmp/foo.sage.py in function_with_common_name(self)
     78      3      def function_with_common_name(self):
     79      4          # lots of lines of code
     80----> 5          _sage_const_1 /_sage_const_0
     81      6          # lots of lines of code
     82      7
     83}}}
     84
    6385For an explanation of why this works, and for a discussion of what would be the best way to fix this, see
    6486[http://groups.google.com/group/sage-devel/browse_thread/thread/761f69944e21efd4]