From 581bf5e9b5ee485ccdbeffa2b20ce520d544e138 Mon Sep 17 00:00:00 2001 From: Unique-Usman Date: Wed, 1 Nov 2023 01:46:19 +0530 Subject: [PATCH 1/3] Explained what error is generated when there is an unhandled exception --- Doc/tutorial/errors.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index 1ec59767e9ce12..aedb52b149c8f2 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -108,8 +108,9 @@ The :keyword:`try` statement works as follows. * If an exception occurs which does not match the exception named in the *except clause*, it is passed on to outer :keyword:`try` statements; if no handler is - found, it is an *unhandled exception* and execution stops with a message as - shown above. + found, it is an *unhandled exception* and execution stops with error message. + The error message will provide information about the *unhandled exception*, + as described in the :ref:`tut-exceptions` section. A :keyword:`try` statement may have more than one *except clause*, to specify handlers for different exceptions. At most one handler will be executed. From 09ec1c4fdd099feb5f3a31cd786dc4d680df8b15 Mon Sep 17 00:00:00 2001 From: Unique-Usman Date: Wed, 1 Nov 2023 02:11:27 +0530 Subject: [PATCH 2/3] Removed trailing whitespace --- Doc/tutorial/errors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index aedb52b149c8f2..5f50b8954b5abc 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -108,7 +108,7 @@ The :keyword:`try` statement works as follows. * If an exception occurs which does not match the exception named in the *except clause*, it is passed on to outer :keyword:`try` statements; if no handler is - found, it is an *unhandled exception* and execution stops with error message. + found, it is an *unhandled exception* and execution stops with error message. The error message will provide information about the *unhandled exception*, as described in the :ref:`tut-exceptions` section. From cea3215f754f9c03a71cea363d0412dec6f96baf Mon Sep 17 00:00:00 2001 From: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com> Date: Sun, 19 Nov 2023 17:34:17 +0530 Subject: [PATCH 3/3] Update Doc/tutorial/errors.rst Explained what happened when there is no handler for an exception i.e unhandled exception. Co-authored-by: Hugo van Kemenade --- Doc/tutorial/errors.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index 5f50b8954b5abc..4058ebe8efdb42 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -108,9 +108,7 @@ The :keyword:`try` statement works as follows. * If an exception occurs which does not match the exception named in the *except clause*, it is passed on to outer :keyword:`try` statements; if no handler is - found, it is an *unhandled exception* and execution stops with error message. - The error message will provide information about the *unhandled exception*, - as described in the :ref:`tut-exceptions` section. + found, it is an *unhandled exception* and execution stops with an error message. A :keyword:`try` statement may have more than one *except clause*, to specify handlers for different exceptions. At most one handler will be executed.