File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -1225,3 +1225,37 @@ Warning types
12251225
12261226.. versionadded :: 3.10
12271227 :c:data: `PyExc_EncodingWarning `.
1228+
1229+
1230+ Tracebacks
1231+ ==========
1232+
1233+ .. c :var :: PyTypeObject PyTraceBack_Type
1234+
1235+ Type object for traceback objects. This is available as
1236+ :class: `types.TracebackType ` in the Python layer.
1237+
1238+
1239+ .. c :function :: int PyTraceBack_Check (PyObject *op)
1240+
1241+ Return true if *op * is a traceback object, false otherwise. This function
1242+ does not account for subtypes.
1243+
1244+
1245+ .. c :function :: int PyTraceBack_Here (PyFrameObject *f)
1246+
1247+ Replace the :attr: `~BaseException.__traceback__ ` attribute on the current
1248+ exception with a new traceback prepending *f * to the existing chain.
1249+
1250+ Calling this function without an exception set is undefined behavior.
1251+
1252+ This function returns ``0 `` on success, and returns ``-1 `` with an
1253+ exception set on failure.
1254+
1255+
1256+ .. c :function :: int PyTraceBack_Print (PyObject *tb, PyObject *f)
1257+
1258+ Write the traceback *tb * into the file *f *.
1259+
1260+ This function returns ``0 `` on success, and returns ``-1 `` with an
1261+ exception set on failure.
You can’t perform that action at this time.
0 commit comments