mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
feat: include exception type in GitHub issue title
This commit is contained in:
parent
7e6b5d5a98
commit
c458489cc0
1 changed files with 4 additions and 1 deletions
|
@ -60,11 +60,14 @@ def exception_handler(exc_type, exc_value, exc_traceback):
|
||||||
line_number = exc_traceback.tb_lineno
|
line_number = exc_traceback.tb_lineno
|
||||||
basename = os.path.basename(filename)
|
basename = os.path.basename(filename)
|
||||||
|
|
||||||
|
# Get the exception type name
|
||||||
|
exception_type = exc_type.__name__
|
||||||
|
|
||||||
# Prepare the issue text
|
# Prepare the issue text
|
||||||
issue_text = f"An uncaught exception occurred:\n\n```\n{tb_text}\n```"
|
issue_text = f"An uncaught exception occurred:\n\n```\n{tb_text}\n```"
|
||||||
|
|
||||||
# Prepare the title
|
# Prepare the title
|
||||||
title = f"Uncaught exception in {basename} line {line_number}"
|
title = f"Uncaught {exception_type} in {basename} line {line_number}"
|
||||||
|
|
||||||
# Report the issue
|
# Report the issue
|
||||||
report_github_issue(issue_text, title=title)
|
report_github_issue(issue_text, title=title)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue