Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5dc8ecc

Browse files
miss-islingtonZeroIntensityStanFromIreland
authored
[3.14]gh-141004: DocumentPyTraceBack* APIs (GH-141192) (GH-141210)
gh-141004: Document `PyTraceBack*` APIs (GH-141192)(cherry picked from commitd13ee0a)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parentb3377c3 commit5dc8ecc

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

‎Doc/c-api/exceptions.rst‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,3 +1237,37 @@ Warning types
12371237
12381238
..versionadded::3.10
12391239
:c:data:`PyExc_EncodingWarning`.
1240+
1241+
1242+
Tracebacks
1243+
==========
1244+
1245+
..c:var:: PyTypeObject PyTraceBack_Type
1246+
1247+
Type object for traceback objects. This is available as
1248+
:class:`types.TracebackType` in the Python layer.
1249+
1250+
1251+
..c:function::intPyTraceBack_Check(PyObject *op)
1252+
1253+
Return true if *op* is a traceback object, false otherwise. This function
1254+
does not account for subtypes.
1255+
1256+
1257+
..c:function::intPyTraceBack_Here(PyFrameObject *f)
1258+
1259+
Replace the:attr:`~BaseException.__traceback__` attribute on the current
1260+
exception with a new traceback prepending *f* to the existing chain.
1261+
1262+
Calling this function without an exception set is undefined behavior.
1263+
1264+
This function returns ``0`` on success, and returns ``-1`` with an
1265+
exception set on failure.
1266+
1267+
1268+
..c:function::intPyTraceBack_Print(PyObject *tb, PyObject *f)
1269+
1270+
Write the traceback *tb* into the file *f*.
1271+
1272+
This function returns ``0`` on success, and returns ``-1`` with an
1273+
exception set on failure.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp