• Kevin Modzelewski's avatar
    Improve tracebacks from eval/exec · 9098ccf1
    Kevin Modzelewski authored
    Previously we would say that they were coming from the same
    file as they are executed in, typically on line 1, which would
    give a misleading traceback saying that the module docstring
    threw the error.
    
    Now, do what CPython does and say that the file is "<string>",
    and don't display the source line.
    
    The method is pretty hacky right now, where it only makes this
    adjustment when generating the traceback.  Instead we should probably
    get rid of storing the BoxedModule in the sourceinfo in the first place,
    and just passing around the relevant info (fn, locals, globals, etc).
    9098ccf1
unwinding.cpp 28.1 KB