Commit Graph

15 Commits

Author SHA1 Message Date
Guido van Rossum
3bb1edb328 Match the error messages to say "(most recent call last)" like the
built-in messages.
2000-04-10 16:29:29 +00:00
Guido van Rossum
e7b146fb3b The third and final doc-string sweep by Ka-Ping Yee.
The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.

A new docstring was added to formatter.  The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.
2000-02-04 15:28:42 +00:00
Guido van Rossum
3f0666c4a2 Add obvious needed else clause to format_exception(). 1998-03-18 17:48:06 +00:00
Guido van Rossum
6e73af723c New version of tb_lineno(), this time *not* using try-except, to avoid
disturbing the current exception, and returning tb.tb_lineno, which is
the line number of thr traceback, rather than the current line number.
By Jim Hugunin.
1998-02-26 17:25:02 +00:00
Guido van Rossum
7266496b00 Tweak the tb_lineno() function to be compatible with JPython, which
has no line number table etc.
1998-02-25 16:33:39 +00:00
Guido van Rossum
4752966193 Use Marc Lemburg's tb_lineno() to calculate the correct line number.
Apparently the traceback object doesn't contains the right linenumber
when -O is used.  Rather than guessing whether -O is on or off, use
tb_lineno() unconditionally.
1997-09-26 22:43:02 +00:00
Guido van Rossum
2deb73a961 Use sys.exc_info() instead of sys.exc_{type,value,traceback}.
Also corrected a typo in format_stack (t should've been f).
1997-07-18 16:46:36 +00:00
Guido van Rossum
2715bb20db Changes to always call list.append with a single argument. 1996-10-08 14:06:35 +00:00
Guido van Rossum
dcc057a793 Added routines to print, format and extract the current, ``live'' stack.
Also added print_list() and format_list() which format the output from
an extract_*() routine.
1996-08-12 23:18:13 +00:00
Guido van Rossum
3c998825bd removed history comment 1996-05-28 23:09:09 +00:00
Guido van Rossum
194e20a9db add file parameter to all printing fns, default stderr 1995-09-20 20:31:51 +00:00
Guido van Rossum
28e99fe96f added format_* functions (suggestion by Ken M) 1995-08-04 04:30:30 +00:00
Guido van Rossum
c7acf2a106 handle class exceptions 1995-02-27 13:15:45 +00:00
Guido van Rossum
7aeb4b9ce8 * Lib/linecache.py: don't crash on empty filename
* Lib/macpath.py: don't return trailing colon for dirname()
	(XXX won't do for volume names -- but otherwise glob(':*:*.py')
	loops forever)
	* Lib/traceback.py: print SyntaxError correctly
	* Lib/stat.py: moved to posixstat.py; added macstat.py which has
	the constants for the Mac; and created new stat.py which includes
	the right one
	* Lib/urllib.py: fix caching bug (by disabling the cache)
1994-08-23 13:32:20 +00:00
Guido van Rossum
526beed88d New module, formats traceback just like the C code does 1994-07-01 15:36:46 +00:00