summaryrefslogtreecommitdiff
path: root/Python/exceptions.c
AgeCommit message (Collapse)AuthorLines
2001-04-14Make some private symbols static.Guido van Rossum-2/+2
2001-02-28SyntaxError__init__(): Be a little more robust when picking apart theFred Drake-16/+22
location information for the SyntaxError -- do not do more than we need to, stopping as soon as an exception has been raised.
2001-02-28SF patch 404928: Support for next Cygwin gcc (2.95.2-8)Tim Peters-8/+2
2001-01-23Leak pluggin', bug fixin' and better documentin'. Specifically,Barry Warsaw-56/+72
module__doc__: Document the Warning subclass heirarchy. make_class(): Added a "goto finally" so that if populate_methods() fails, the return status will be -1 (failure) instead of 0 (success). fini_exceptions(): When decref'ing the static pointers to the exception classes, clear out their dictionaries too. This breaks a cycle from class->dict->method->class and allows the classes with unbound methods to be reclaimed. This plugs a large memory leak in a common Py_Initialize()/dosomething/Py_Finalize() loop.
2000-12-15Add definitions for standard warning category classes (PyExc_WarningGuido van Rossum-0/+36
etc.).
2000-10-24Ka-Ping Yee <ping@lfw.org>:Fred Drake-1/+1
Changes to error messages to increase consistency & clarity. This (mostly) closes SourceForge patch #101839.
2000-08-18Remove a couple of warnings turned up by "gcc -Wall".Fred Drake-2/+2
2000-08-18SyntaxError__classinit__(): Slight reorg for simplicity.Barry Warsaw-4/+4
2000-08-16SyntaxError__str__(): Fix two memory problems discovered by Insure.Barry Warsaw-4/+9
First, the allocated buffer was never freed after using it to create the PyString object. Second, it was possible that have_filename would be false (meaning that filename was not a PyString object), but that the code would still try to PyString_GET_SIZE() it.
2000-08-15my_basename(): Removes the leading path components from a path name,Fred Drake-2/+23
returning a pointer to the start of the file's "base" name; similar to os.path.basename(). SyntaxError__str__(): Use my_basename() to keep the length of the file name included in the exception message short.
2000-08-15SyntaxError__str__(): Do more formatting of the exception here, ratherFred Drake-6/+55
than depending on the site that raises the exception. If the filename and lineno attributes are set on the exception object, use them to augment the message displayed. This is part of what is needed to close SoruceForge bug #110628 (Jitterbug PR#278).
2000-08-15Fix the parent of WindowsError - both the comments in this source file, and ↵Mark Hammond-1/+1
the previous exceptions.py have WindowsError as a sub-class of OSError.
2000-07-22Fix two instances of empty argument lists, and fix styleThomas Wouters-79/+78
('PyObject** x' -> 'PyObject **x')
2000-07-16Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters-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 ;)
2000-07-12replace PyXXX_Length calls with PyXXX_Size callsJeremy Hylton-8/+9
2000-07-12Worm around MSVC6 error on single string literal > 2Kb.Tim Peters-2/+7
2000-07-11Create two new exceptions: IndentationError and TabError. These areFred Drake-0/+17
used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856.
2000-07-09Exception__str__(): In case 1, be sure to decref the tmp localBarry Warsaw-4/+8
variable. This crushes another memory leak. Slight rewrite included.
2000-07-09EnvironmentError__init__(): The two case clauses were missingBarry Warsaw-3/+9
`break's. This first missing break caused a memory leak when case 3 fell through case 2 in the following example: import os os.chmod('/missing', 0600)
2000-07-01init_exceptions(): Decref `doc' so it doesn't leak.Barry Warsaw-0/+1
2000-06-30replace constant 1 with symbolic constant METH_VARARGSJeremy Hylton-9/+9
another typo caught by Rob Hooft
2000-06-20mark SyntaxError__str__ as METH_VARARGSJeremy Hylton-1/+1
2000-05-26The standard exception classes. Moved here from ../Modules/_exceptions.cBarry Warsaw-0/+994