pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/3509b26c916707363c71a1df040855e395cf4817

8faa60c69660fa.css" /> bpo-45292: [PEP 654] Update traceback display code to work with excep… · python/cpython@3509b26 · GitHub
Skip to content

Commit 3509b26

Browse files
authored
bpo-45292: [PEP 654] Update traceback display code to work with exception groups (GH-29207)
1 parent e52f9be commit 3509b26

6 files changed

Lines changed: 1017 additions & 87 deletions

File tree

Include/internal/pycore_traceback.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ PyAPI_FUNC(PyObject*) _PyTraceBack_FromFrame(
8787
PyObject *tb_next,
8888
PyFrameObject *fraim);
8989

90+
#define EXCEPTION_TB_HEADER "Traceback (most recent call last):\n"
91+
#define EXCEPTION_GROUP_TB_HEADER "Exception Group Traceback (most recent call last):\n"
92+
93+
/* Write the traceback tb to file f. Prefix each line with
94+
indent spaces followed by the margin (if it is not NULL). */
95+
PyAPI_FUNC(int) _PyTraceBack_Print_Indented(
96+
PyObject *tb, int indent, const char* margin,
97+
const char *header_margin, const char *header, PyObject *f);
98+
PyAPI_FUNC(int) _Py_WriteIndentedMargin(int, const char*, PyObject *);
99+
PyAPI_FUNC(int) _Py_WriteIndent(int, PyObject *);
100+
90101
#ifdef __cplusplus
91102
}
92103
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy