summaryrefslogtreecommitdiffstats
path: root/Lib/traceback.py
Commit message (Collapse)AuthorAgeFilesLines
* #3584: ignore trailing newlines when placing the caret for a SyntaxError ↵Georg Brandl2009-06-041-1/+1
| | | | location.
* #1326077: fix traceback formatting of SyntaxErrors. This fixes two ↵Georg Brandl2009-04-051-5/+4
| | | | differences with formatting coming from Python: a) the reproduction of location details in the error message if no line text is given, b) the prefixing of the last line by one space.
* complain when there's no last exceptionBenjamin Peterson2009-03-231-0/+2
|
* revert r70552; wrong fixBenjamin Peterson2009-03-231-5/+5
|
* fix very old names for exception terms #5543Benjamin Peterson2009-03-231-5/+5
|
* Fix a DeprecationWarning about __getitem__() and exceptions in the ↵Brett Cannon2008-08-011-1/+1
| | | | 'traceback' module.
* Fix a bug in traceback.format_exception_only() that led to an errorGeorg Brandl2006-09-241-1/+1
| | | | | being raised when print_exc() was called without an exception set. In version 2.4, this printed "None", restored that behavior.
* Better fix for bug #1531405, not executing str(value) twice.Georg Brandl2006-08-041-7/+3
|
* Bug #1531405, format_exception no longer raises an exception ifNeal Norwitz2006-08-041-1/+6
| | | | str(exception) raised an exception.
* Whitespace normalization.Tim Peters2006-07-241-4/+4
|
* Repair accidental NameError.Georg Brandl2006-07-241-1/+2
|
* Patch #1515343: Fix printing of deprecated string exceptions with aGeorg Brandl2006-07-241-42/+54
| | | | value in the traceback module.
* Fix the formatting of KeyboardInterrupt -- a bad issubclass() call.Guido van Rossum2006-05-021-1/+1
|
* reverting r45321: Patch #860326: traceback.format_exception_only() nowAnthony Baxter2006-04-131-5/+1
| | | | | | | | prepends the exception's module name to non-builtin exceptions, like the interpreter itself does. broke a number of doctests. should be discussed before checking in (see discussion on python-dev).
* Patch #860326: traceback.format_exception_only() now prepends theGeorg Brandl2006-04-121-1/+5
| | | | | exception's module name to non-builtin exceptions, like the interpreter itself does.
* Updated the warnings, linecache, inspect, traceback, site, and doctest modulesPhillip J. Eby2006-04-111-3/+3
| | | | | to work correctly with modules imported from zipfiles or via other PEP 302 __loader__ objects. Tests and doc updates are included.
* traceback now shows error position for all SyntaxError subclasses,Georg Brandl2006-03-311-1/+1
| | | | e.g. IndentationError. (bug #1447885)
* Revert r42719, because the isinstance() check wasn't redundant; formatting aPhillip J. Eby2006-03-241-1/+1
| | | | string exception was causing a TypeError.
* Remove redundant isinstance() check.Thomas Wouters2006-03-011-1/+1
|
* PEP 352 implementation. Creates a new base class, BaseException, which has anBrett Cannon2006-03-011-1/+2
| | | | | | | | | added message attribute compared to the previous version of Exception. It is also a new-style class, making all exceptions now new-style. KeyboardInterrupt and SystemExit inherit from BaseException directly. String exceptions now raise DeprecationWarning. Applies patch 1104669, and closes bugs 1012952 and 518846.
* SF #737473: Show up-to-date source code in tracebacks always.Hye-Shik Chang2004-10-261-0/+3
| | | | | And add an optional argument 'filename' to linecache.checkcache() to enable checking caches per-file.
* Whitespace normalization.Tim Peters2004-01-181-1/+1
|
* Add traceback.format_exc().Neil Schemenauer2003-11-051-2/+12
|
* This is my patchMichael W. Hudson2002-08-151-22/+5
| | | | | | | | [ 587993 ] SET_LINENO killer Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab. Many sundry changes to document and adapt to this change.
* Replaced boolean tests with is None.Raymond Hettinger2002-06-021-5/+5
|
* SF bug 431772: traceback.print_exc() causes tracebackTim Peters2001-06-101-13/+14
| | | | | | | Patch from Michael Hundson. format_exception_only() blew up when trying to report a SyntaxError from a string input (line is None in this case, but it assumed a string). Bugfix candidate.
* Whitespace normalization.Tim Peters2001-03-291-1/+1
|
* Do not print caret when offset is None.Jeremy Hylton2001-03-211-7/+8
|
* Reformat and edit docstrings to follow modern conventions. SingleJeremy Hylton2001-03-211-50/+68
| | | | line summary followed by blank line and description.
* final round of __all__ lists (I hope) - skipped urllib2 because Moshe may beSkip Montanaro2001-03-011-0/+5
| | | | giving it a slight facelift
* String method cleanup.Eric S. Raymond2001-02-101-4/+2
|
* String method conversion.Eric S. Raymond2001-02-091-6/+6
|
* Whitespace normalization.Tim Peters2001-01-151-233/+233
|
* mwh: [ Patch #103228 ] traceback.py nit.Guido van Rossum2001-01-131-1/+5
| | | | | When the exception has no message, don't insert a colon after the exception name.
* Patch by Toby Dickenson: don't die when an error occurs during stringGuido van Rossum2000-08-221-1/+7
| | | | | conversion in an exception, but instead display <unprintable %s object> where %s is the type name.
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-1/+1
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* Match the error messages to say "(most recent call last)" like theGuido van Rossum2000-04-101-5/+5
| | | | built-in messages.
* The third and final doc-string sweep by Ka-Ping Yee.Guido van Rossum2000-02-041-7/+68
| | | | | | | | 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.
* Add obvious needed else clause to format_exception().Guido van Rossum1998-03-181-0/+2
|
* New version of tb_lineno(), this time *not* using try-except, to avoidGuido van Rossum1998-02-261-8/+8
| | | | | | 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.
* Tweak the tb_lineno() function to be compatible with JPython, whichGuido van Rossum1998-02-251-4/+8
| | | | has no line number table etc.
* Use Marc Lemburg's tb_lineno() to calculate the correct line number.Guido van Rossum1997-09-261-3/+21
| | | | | | 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.
* Use sys.exc_info() instead of sys.exc_{type,value,traceback}.Guido van Rossum1997-07-181-9/+9
| | | | Also corrected a typo in format_stack (t should've been f).
* Changes to always call list.append with a single argument.Guido van Rossum1996-10-081-2/+2
|
* Added routines to print, format and extract the current, ``live'' stack.Guido van Rossum1996-08-121-7/+65
| | | | | Also added print_list() and format_list() which format the output from an extract_*() routine.
* removed history commentGuido van Rossum1996-05-281-3/+0
|
* add file parameter to all printing fns, default stderrGuido van Rossum1995-09-201-12/+30
|
* added format_* functions (suggestion by Ken M)Guido van Rossum1995-08-041-7/+31
|
* handle class exceptionsGuido van Rossum1995-02-271-6/+13
|
* * Lib/linecache.py: don't crash on empty filenameGuido van Rossum1994-08-231-5/+27
| | | | | | | | | | | * 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)