unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: ". shynur" <one.last.kiss@outlook.com>
To: 70653@debbugs.gnu.org
Subject: bug#70653: [PATCH] Support source line location for Python ExceptionGroup
Date: Mon, 29 Apr 2024 16:24:10 +0000	[thread overview]
Message-ID: <PH0PR11MB7470E9544CF66FAC8699B31DD71B2@PH0PR11MB7470.namprd11.prod.outlook.com> (raw)

(This patch is written for Inferior Python mode.)

The original behavior considered only the case of
single exception:

```
Traceback (most recent call last):
  File "<string>", line 17, in __PYTHON_EL_eval
  File "c:/Users/shynur/Desktop/Python/a.py", line 1, in <module>
    raise Exception
Exception
```

In the above example, one can click at the 3rd line to jump
to the corresponding source line.  This patch adds support
for the following case (i.e., the built-in ExceptionGroup):

```
+ Exception Group Traceback (most recent call last):
  |   File "<string>", line 17, in __PYTHON_EL_eval
  |   File "c:/Users/shynur/Desktop/Python/a.py", line 1, in <module>
  |     raise ExceptionGroup("", [Exception()])
  | ExceptionGroup:  (1 sub-exception)
  +-+---------------- 1 ----------------
    | Exception
    +------------------------------------
```

--
shynur

             reply	other threads:[~2024-04-29 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 16:24 . shynur [this message]
2024-04-29 16:31 ` bug#70653: #70653 PATCH here . shynur
2024-05-02  9:28   ` Eli Zaretskii
2024-04-29 16:48 ` bug#70653: [PATCH] Support source line location for Python ExceptionGroup Eli Zaretskii
2024-04-30  7:27   ` kobarity
2024-04-30 10:24     ` . shynur
2024-05-01  8:16       ` kobarity
2024-05-02  9:36       ` Eli Zaretskii
2024-05-03 11:48         ` shynur .
2024-05-04 11:53           ` Eli Zaretskii
2024-05-02  9:35     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR11MB7470E9544CF66FAC8699B31DD71B2@PH0PR11MB7470.namprd11.prod.outlook.com \
    --to=one.last.kiss@outlook.com \
    --cc=70653@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).