Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Refactor exception handling in `Site.render`

Aperta
#1,295 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start at the Site.render entry point and trace how exceptions are collected and how output is written. Replace the aggregation metadata with Exception.add_note() and write the error output to Site.output / 'error.log'; done means no temporary error file is left for the user to clean up.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Djangonauts

Currently Site.render aggregates all of the exceptions into a list with some additional metadata to be processed. That metadata should be added to the exceptions using Exception.add_note():

>>> try:
...     raise RuntimeError("This is a test...")
... except RuntimeError as e:
...     e.add_note("Will this appear?")
...     raise e from None
...
Traceback (most recent call last):
  File "<python-input-89>", line 5, in <module>
    raise e from None
  File "<python-input-89>", line 2, in <module>
    raise RuntimeError("This is a test...")
RuntimeError: This is a test...
Will this appear?

In addition, the output is currently being written to a temp file that is not getting cleaned up. We should modify that to write to `Site.output / 'error.log`` to avoid leaving temp files around for the user to clean up.

Lingua principale
Python
Stelle
64
Fork
46
Merge medio
1g 16h
PR unite (30g)
17

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di render-engine/render-engine

Tutte le issue di render-engine/render-engine

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.