Georg Brandl
edd81b2402
Fix a bug in traceback.format_exception_only() that led to an error
...
being raised when print_exc() was called without an exception set.
In version 2.4, this printed "None", restored that behavior.
(backport from rev. 51995)
2006-09-24 12:50:28 +00:00
Georg Brandl
16183631ed
Better fix for bug #1531405 , not executing str(value) twice.
2006-08-04 18:07:34 +00:00
Neal Norwitz
ff4b63b80f
Bug #1531405 , format_exception no longer raises an exception if
...
str(exception) raised an exception.
2006-08-04 04:50:21 +00:00
Tim Peters
0bbfd83250
Whitespace normalization.
2006-07-24 21:02:15 +00:00
Georg Brandl
afb44f47d9
Repair accidental NameError.
2006-07-24 20:11:35 +00:00
Georg Brandl
c13c34c39d
Patch #1515343 : Fix printing of deprecated string exceptions with a
...
value in the traceback module.
2006-07-24 14:09:56 +00:00
Guido van Rossum
8f6cbe1502
Fix the formatting of KeyboardInterrupt -- a bad issubclass() call.
2006-05-02 17:36:09 +00:00
Anthony Baxter
57fdcbc60f
reverting r45321: Patch #860326 : traceback.format_exception_only() now
...
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).
2006-04-13 01:34:33 +00:00
Georg Brandl
24c274f5dc
Patch #860326 : traceback.format_exception_only() now prepends the
...
exception's module name to non-builtin exceptions, like the interpreter
itself does.
2006-04-12 21:14:09 +00:00
Phillip J. Eby
4703211080
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
...
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects. Tests and doc updates are included.
2006-04-11 01:07:43 +00:00
Georg Brandl
51dbc4c879
traceback now shows error position for all SyntaxError subclasses,
...
e.g. IndentationError. (bug #1447885 )
2006-03-31 15:59:13 +00:00
Phillip J. Eby
4a26633e0e
Revert r42719, because the isinstance() check wasn't redundant; formatting a
...
string exception was causing a TypeError.
2006-03-24 22:10:54 +00:00
Thomas Wouters
7c187bcc82
Remove redundant isinstance() check.
2006-03-01 05:34:22 +00:00
Brett Cannon
bf36409e2a
PEP 352 implementation. Creates a new base class, BaseException, which has an
...
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.
2006-03-01 04:25:17 +00:00
Hye-Shik Chang
182ac85147
SF #737473 : Show up-to-date source code in tracebacks always.
...
And add an optional argument 'filename' to linecache.checkcache()
to enable checking caches per-file.
2004-10-26 09:16:42 +00:00
Tim Peters
58eb11cf62
Whitespace normalization.
2004-01-18 20:29:55 +00:00
Neil Schemenauer
f607fc5395
Add traceback.format_exc().
2003-11-05 23:03:00 +00:00
Michael W. Hudson
dd32a91cc0
This is my patch
...
[ 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.
2002-08-15 14:59:02 +00:00
Raymond Hettinger
10ff706e27
Replaced boolean tests with is None.
2002-06-02 03:04:52 +00:00
Tim Peters
0bb580d297
SF bug 431772: traceback.print_exc() causes traceback
...
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.
2001-06-10 18:58:26 +00:00
Tim Peters
a19a168ccc
Whitespace normalization.
2001-03-29 04:36:09 +00:00
Jeremy Hylton
ed9d0ba482
Do not print caret when offset is None.
2001-03-21 20:29:18 +00:00
Jeremy Hylton
69e9e8bd51
Reformat and edit docstrings to follow modern conventions. Single
...
line summary followed by blank line and description.
2001-03-21 19:09:31 +00:00
Skip Montanaro
40fc16059f
final round of __all__ lists (I hope) - skipped urllib2 because Moshe may be
...
giving it a slight facelift
2001-03-01 04:27:19 +00:00
Eric S. Raymond
6e025bcde8
String method cleanup.
2001-02-10 00:22:33 +00:00