Author: Armin Rigo <ar...@tunes.org> Branch: numpy-dtype-alt Changeset: r46697:82779143884f Date: 2011-08-22 07:23 +0200 http://bitbucket.org/pypy/pypy/changeset/82779143884f/
Log: Yay. Incredible improvement: actually *display* the graph passed in the error message, instead of just displaying something very helpful like "<return block>" and nothing else. diff --git a/pypy/tool/error.py b/pypy/tool/error.py --- a/pypy/tool/error.py +++ b/pypy/tool/error.py @@ -17,7 +17,7 @@ from pypy.interpreter.pytraceback import offset2lineno import traceback -def source_lines(graph, block, operindex=None, offset=None, long=False, \ +def source_lines1(graph, block, operindex=None, offset=None, long=False, \ show_lines_of_code=SHOW_DEFAULT_LINES_OF_CODE): if block is not None: if block is graph.returnblock: @@ -61,6 +61,10 @@ lines.append("") return lines +def source_lines(graph, *args, **kwds): + lines = source_lines1(graph, *args, **kwds) + return ['In %r:' % (graph,)] + lines + class FlowingError(Exception): pass _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit