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

Standardize exception handling

Aperta
#166 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp, python
Ambito
backend

Direzione di ricerca

Inizia esaminando i percorsi elencati dl-serve, calibration(), Entity, Interface._send_request(), ReturnCodes.py e ThrowReply, quindi leggi l’issue 103 collegata di dripline-cpp. Esamina anche le Implementations non ancora revisionate. Il lavoro è completato quando il comportamento delle eccezioni è coerente tra Caller, Execution e Details e la propagazione o cattura prevista è verificata.

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

Descrizione

Exception handling in dl-cpp: https://github.com/driplineorg/dripline-cpp/issues/103

The primary execution of most actions in dl-py takes place in C++, so most error handling will end up in the C++ code. Between C++ and Python the typical sequence of stages is Caller (Python) --> Execution (C++) --> Details (Python). Details includes things like doing calibrations. Most time is spent in the Execution and Details stages, and the Execution stage is typically responsible for the final error handling and making decisions about whether to exit the application. So we need to ensure that the error handling drops back to the C++ in the right ways.

Caller stage
  • dl-serve
    • Calls service::listen() and checks boolean return
    • Raises RuntimeError to exit if necessary
Execution stage

See https://github.com/driplineorg/dripline-cpp/issues/103

Details stage
  • ✅ AlertConsumer
    • Does not raise exceptions
  • ❌ Calibrate
    • calibration()
      • raises exceptions.DriplineValueError
      • This is the calibration decorator, which will be called when responding to a request
      • Therefore this is not the right use of DriplineValueError
  • ✅ Endpoint
    • Several functions
      • Raises only ThrowReply
  • ❓ Entity
    • Several functions
      • Raise ValueError
      • Question Is this right? Are these caught somewhere?
  • ✅ Interface
    • _send_request()
      • Raises DriplineError
      • Called by get(), set(), and cmd()
        • Not caught
        • Will pass exception up to the user of Interface
  • ✅ ReturnCodes.py
    • Does not raise exceptions
  • ✅ ThrowReply
    • Does not raise exceptions

I have not checked any code in Implementations.

Lingua principale
Python
Stelle
3
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un 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 driplineorg/dripline-python

Tutte le issue di driplineorg/dripline-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.