[Python-checkins] CVS: python/dist/src/Lib traceback.py,1.14,1.15
Guido van Rossum
python-dev@python.org
Mon, 10 Apr 2000 12:29:33 -0400 (EDT)
Update of /projects/cvsroot/python/dist/src/Lib
In directory eric:/projects/python/develop/guido/src/Lib
Modified Files:
traceback.py
Log Message:
Match the error messages to say "(most recent call last)" like the
built-in messages.
Index: traceback.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/traceback.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** traceback.py 2000/02/04 15:28:41 1.14
--- traceback.py 2000/04/10 16:29:29 1.15
***************
*** 98,102 ****
from the traceback 'tb' to 'file'. This differs from print_tb() in
the following ways: (1) if traceback is not None, it prints a header
! "Traceback (innermost last):"; (2) it prints the exception type and
value after the stack trace; (3) if type is SyntaxError and value has
the appropriate format, it prints the line where the syntax error
--- 98,102 ----
from the traceback 'tb' to 'file'. This differs from print_tb() in
the following ways: (1) if traceback is not None, it prints a header
! "Traceback (most recent call last):"; (2) it prints the exception type and
value after the stack trace; (3) if type is SyntaxError and value has
the appropriate format, it prints the line where the syntax error
***************
*** 106,110 ****
file = sys.stderr
if tb:
! _print(file, 'Traceback (innermost last):')
print_tb(tb, limit, file)
lines = format_exception_only(etype, value)
--- 106,110 ----
file = sys.stderr
if tb:
! _print(file, 'Traceback (most recent call last):')
print_tb(tb, limit, file)
lines = format_exception_only(etype, value)
***************
*** 121,125 ****
printed as does print_exception()."""
if tb:
! list = ['Traceback (innermost last):\n']
list = list + format_tb(tb, limit)
else:
--- 121,125 ----
printed as does print_exception()."""
if tb:
! list = ['Traceback (most recent call last):\n']
list = list + format_tb(tb, limit)
else:
***************
*** 219,224 ****
'f' and 'limit' arguments have the same meaning as for print_stack().
Each item in the list is a quadruple (filename, line number,
! function name, text), and the entries are in order from outermost
! to innermost stack frame."""
if f is None:
try:
--- 219,224 ----
'f' and 'limit' arguments have the same meaning as for print_stack().
Each item in the list is a quadruple (filename, line number,
! function name, text), and the entries are in order from oldest
! to newest stack frame."""
if f is None:
try: