summaryrefslogtreecommitdiffstats
path: root/Python/exceptions.c
Commit message (Collapse)AuthorAgeFilesLines
* Add definitions for standard warning category classes (PyExc_WarningGuido van Rossum2000-12-151-0/+36
| | | | etc.).
* Ka-Ping Yee <ping@lfw.org>:Fred Drake2000-10-241-1/+1
| | | | | | Changes to error messages to increase consistency & clarity. This (mostly) closes SourceForge patch #101839.
* Remove a couple of warnings turned up by "gcc -Wall".Fred Drake2000-08-181-2/+2
|
* SyntaxError__classinit__(): Slight reorg for simplicity.Barry Warsaw2000-08-181-4/+4
|
* SyntaxError__str__(): Fix two memory problems discovered by Insure.Barry Warsaw2000-08-161-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.
* my_basename(): Removes the leading path components from a path name,Fred Drake2000-08-151-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.
* SyntaxError__str__(): Do more formatting of the exception here, ratherFred Drake2000-08-151-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).
* Fix the parent of WindowsError - both the comments in this source file, and ↵Mark Hammond2000-08-151-1/+1
| | | | the previous exceptions.py have WindowsError as a sub-class of OSError.
* Fix two instances of empty argument lists, and fix styleThomas Wouters2000-07-221-79/+78
| | | | ('PyObject** x' -> 'PyObject **x')
* 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 ;)
* replace PyXXX_Length calls with PyXXX_Size callsJeremy Hylton2000-07-121-8/+9
|
* Worm around MSVC6 error on single string literal > 2Kb.Tim Peters2000-07-121-2/+7
|
* Create two new exceptions: IndentationError and TabError. These areFred Drake2000-07-111-0/+17
| | | | | | | used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856.
* Exception__str__(): In case 1, be sure to decref the tmp localBarry Warsaw2000-07-091-4/+8
| | | | | variable. This crushes another memory leak. Slight rewrite included.
* EnvironmentError__init__(): The two case clauses were missingBarry Warsaw2000-07-091-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)
* init_exceptions(): Decref `doc' so it doesn't leak.Barry Warsaw2000-07-011-0/+1
|
* replace constant 1 with symbolic constant METH_VARARGSJeremy Hylton2000-06-301-9/+9
| | | | another typo caught by Rob Hooft
* mark SyntaxError__str__ as METH_VARARGSJeremy Hylton2000-06-201-1/+1
|
* The standard exception classes. Moved here from ../Modules/_exceptions.cBarry Warsaw2000-05-261-0/+994