From 235cbe17f811119a83d54c74f69905b9d9a421db Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sat, 5 Oct 2024 00:52:14 +0100 Subject: [PATCH 1/2] gh-119786: fixup! move a few more details on exception handling from devguide to InternalDocs --- InternalDocs/exception_handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InternalDocs/exception_handling.md b/InternalDocs/exception_handling.md index 2e306c7046e237..195bb0a9e20c41 100644 --- a/InternalDocs/exception_handling.md +++ b/InternalDocs/exception_handling.md @@ -190,5 +190,5 @@ Exception Chaining Implementation [Exception chaining](https://docs.python.org/dev/tutorial/errors.html#exception-chaining) refers to setting the ``__context__`` and ``__cause__`` fields of an exception as it is being raised. The ``__context__`` field is set by ``_PyErr_SetObject()`` in -:cpy-file:`Python/errors.c` (which is ultimately called by all ``PyErr_Set*()`` functions). +``Python/errors.c`` (which is ultimately called by all ``PyErr_Set*()`` functions). The ``__cause__`` field (explicit chaining) is set by the ``RAISE_VARARGS`` bytecode. From 326017ddb10377a670413c31ec50098365524085 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Sat, 5 Oct 2024 00:56:47 +0100 Subject: [PATCH 2/2] Link to Python/errors.c --- InternalDocs/exception_handling.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InternalDocs/exception_handling.md b/InternalDocs/exception_handling.md index 195bb0a9e20c41..64a346b55b8413 100644 --- a/InternalDocs/exception_handling.md +++ b/InternalDocs/exception_handling.md @@ -190,5 +190,6 @@ Exception Chaining Implementation [Exception chaining](https://docs.python.org/dev/tutorial/errors.html#exception-chaining) refers to setting the ``__context__`` and ``__cause__`` fields of an exception as it is being raised. The ``__context__`` field is set by ``_PyErr_SetObject()`` in -``Python/errors.c`` (which is ultimately called by all ``PyErr_Set*()`` functions). +[Python/errors.c](https://github.com/python/cpython/blob/main/Python/errors.c) +(which is ultimately called by all ``PyErr_Set*()`` functions). The ``__cause__`` field (explicit chaining) is set by the ``RAISE_VARARGS`` bytecode.