diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-09-20 22:42:10 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-09-20 22:42:10 (GMT) |
commit | 2c53971b37cd69f45d52c498c953734f961deb77 (patch) | |
tree | 6fa5bb08f26cad8da01998fb92ae0d5650924438 /Doc | |
parent | 26d64aeee4face9f6929f4207647b0052ad27c36 (diff) | |
download | cpython-2c53971b37cd69f45d52c498c953734f961deb77.zip cpython-2c53971b37cd69f45d52c498c953734f961deb77.tar.gz cpython-2c53971b37cd69f45d52c498c953734f961deb77.tar.bz2 |
add PyErr_SyntaxLocationEx, to support adding a column offset
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/exceptions.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index f969b96..899666f 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -294,6 +294,20 @@ in various ways. There is a separate error indicator for each thread. parameter specifying the exception type to be raised. Availability: Windows. +.. cfunction:: void PyErr_SyntaxLocationEx(char *filename, int lineno, int col_offset) + + Set file, line, and offset information for the current exception. If the + current exception is not a :exc:`SyntaxError`, then it sets additional + attributes, which make the exception printing subsystem think the exception + is a :exc:`SyntaxError`. + + +.. cfunction:: void PyErr_SyntaxLocation(char *filename, int lineno) + + Like :cfunc:`PyErr_SyntaxLocationExc`, but the col_offset parameter is + omitted. + + .. cfunction:: void PyErr_BadInternalCall() This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, |