Standardize exception handling
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
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
- Calls
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
- raises
- ✅ Endpoint
- Several functions
- Raises only ThrowReply
- Several functions
- ❓ Entity
- Several functions
- Raise ValueError
- Question Is this right? Are these caught somewhere?
- Several functions
- ✅ Interface
_send_request()- Raises DriplineError
- Called by
get(),set(), andcmd()- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di driplineorg/dripline-python
-
Log on set delayAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
driplineorg/dripline-python#222 · 1 commento ·
-
Create Logging WrapperAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
driplineorg/dripline-python#221 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
driplineorg/dripline-python#214 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
driplineorg/dripline-python#207 ·
-
Inconsistent response behavior with a 'values' arrayForse di nuovo libera @pkolbeck l’ha presa 486 giorni fa e non c’è nessuna pull request aperta. Aperta
driplineorg/dripline-python#204 · 1 commento · 2 assegnatari ·
Tutte le issue di driplineorg/dripline-python
Issue simili
-
bug needs-triage priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
yeongseon/azure-functions-logging-python#583 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation needs-triage priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
yeongseon/azure-functions-validation-python#546 ·
I maintainer di solito rispondono entro 1 giorno
-
PHP workflow streaming requests buffer the full SSE responseForse già presa @Winoren l’ha presa oggi. Apertareview: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
langgenius/dify#44270 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
P4: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jeffknupp/association#523 ·
-
bug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
DarkStarSystems/pcons#229 ·
I maintainer di solito rispondono entro 1 giorno