Impossible to handle shell exceptions with shell(),
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Non vengono indicati file sorgente né test. Inizia tracciando l’implementazione di shell() e il percorso di gestione delle eccezioni di try(); quindi esamina come ShellException valorizza il proprio messaggio e come viene esposto exception[1]. Il lavoro è completato quando gli errori di shell rendono disponibile lo stderr del comando tramite il valore dell’eccezione documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
CMDHELPER-3020 - Reported by VergilPrime
So lets say I run a command in shell(). Lets say the code is shell(@command).
I run it, something's wrong so it errors. I see "ShellException" in console, but not much else.
I want to see what the problem is so I do @output = shell(@command); sys_out(@output) to check to see what's going on. The problem is, because shell threw ShellException, sys_out(@output) will never run.
So lets say I'm a super smart cookie and I do try(@output = shell(@command), sys_out(@output)) so that sys_out() runs when shell() fails. @output is still empy.
One last thing we can try, try(shell(@command),@exception,sys_out(@exception[1])).
This should work because @exception "... is set to an array containing the following information about the exception: ... 1 - The message generated by the exception..."
and shell() "... throws a ShellException with the exception message set to the syserr output if the process exits with an exit code that isn't the expectedExitCode..."
Upon running this code we find that @exception[1] is empty.
- Lingua principale
- Java
- Stelle
- 128
- Fork
- 70
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la 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 EngineHub/CommandHelper
-
discussion wanted documentation
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
EngineHub/CommandHelper#1403 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
EngineHub/CommandHelper#1370 · 1 commento ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
EngineHub/CommandHelper#1354 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
EngineHub/CommandHelper#1349 · 3 commenti ·
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
EngineHub/CommandHelper#1341 · 2 commenti ·
Tutte le issue di EngineHub/CommandHelper
Issue simili
-
certification
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Apertabug ecr
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Needs: Triage Type: Feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
github/copilot-sdk#2760 ·