@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.12\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2024-05-11 19:07 +0000\n "
14+ "POT-Creation-Date : 2024-08-31 11:30 +0000\n "
1515"PO-Revision-Date : 2024-05-11 00:32+0000\n "
1616"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024\n "
1717"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -71,13 +71,11 @@ msgstr ""
7171
7272#: ../../c-api/exceptions.rst:37
7373msgid ""
74- "The error indicator is **not** the result of :func:`sys.exc_info() `. The "
74+ "The error indicator is **not** the result of :func:`sys.exc_info`. The "
7575"former corresponds to an exception that is not yet caught (and is therefore "
7676"still propagating), while the latter returns an exception after it is caught"
7777" (and has therefore stopped propagating)."
7878msgstr ""
79- "错误指示器 **不是** :func:`sys.exc_info()` "
80- "的执行结果。前者对应尚未捕获的异常(异常还在传播),而后者在捕获异常后返回这个异常(异常已经停止传播)。"
8179
8280#: ../../c-api/exceptions.rst:44
8381msgid "Printing and clearing"
@@ -569,6 +567,17 @@ msgstr "此函数会被需要捕获异常的代码,或需要临时保存和恢
569567msgid "For example::"
570568msgstr "例如:"
571569
570+ #: ../../c-api/exceptions.rst:438
571+ msgid ""
572+ "{\n"
573+ " PyObject *exc = PyErr_GetRaisedException();\n"
574+ "\n"
575+ " /* ... code that might produce other errors ... */\n"
576+ "\n"
577+ " PyErr_SetRaisedException(exc);\n"
578+ "}"
579+ msgstr ""
580+
572581#: ../../c-api/exceptions.rst:446
573582msgid ""
574583":c:func:`PyErr_GetHandledException`, to save the exception currently being "
@@ -607,6 +616,18 @@ msgid ""
607616"exceptions or save and restore the error indicator temporarily."
608617msgstr "此函数通常只被需要捕获异常或临时保存和恢复错误指示符的旧式代码所使用。"
609618
619+ #: ../../c-api/exceptions.rst:482
620+ msgid ""
621+ "{\n"
622+ " PyObject *type, *value, *traceback;\n"
623+ " PyErr_Fetch(&type, &value, &traceback);\n"
624+ "\n"
625+ " /* ... code that might produce other errors ... */\n"
626+ "\n"
627+ " PyErr_Restore(type, value, traceback);\n"
628+ "}"
629+ msgstr ""
630+
610631#: ../../c-api/exceptions.rst:496
611632msgid "Use :c:func:`PyErr_SetRaisedException` instead."
612633msgstr "请改用 :c:func:`PyErr_SetRaisedException`。"
@@ -664,6 +685,13 @@ msgstr ""
664685"此函数 *不会* 隐式地在异常值上设置 :attr:`~BaseException.__traceback__` 属性。 "
665686"如果想要适当地设置回溯,还需要以下附加代码片段::"
666687
688+ #: ../../c-api/exceptions.rst:537
689+ msgid ""
690+ "if (tb != NULL) {\n"
691+ " PyException_SetTraceback(val, tb);\n"
692+ "}"
693+ msgstr ""
694+
667695#: ../../c-api/exceptions.rst:544
668696msgid ""
669697"Retrieve the active exception instance, as would be returned by "
0 commit comments