Impossible to handle shell exceptions with shell(),
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
No se nombran archivos fuente ni pruebas. Empieza siguiendo la implementación de shell() y la ruta de manejo de excepciones de try(); después, inspecciona cómo ShellException rellena su mensaje y cómo se expone exception[1]. Se considera terminado cuando los fallos de shell hacen que el stderr del comando esté disponible mediante el valor de excepción documentado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 128
- Forks
- 70
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de EngineHub/CommandHelper
-
discussion wanted documentation
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
EngineHub/CommandHelper#1403 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
EngineHub/CommandHelper#1370 · 1 comentario ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
EngineHub/CommandHelper#1354 ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
EngineHub/CommandHelper#1349 · 3 comentarios ·
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
EngineHub/CommandHelper#1341 · 2 comentarios ·
Todos los issues de EngineHub/CommandHelper
Issues similares
-
certification
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Abiertobug ecr
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Needs: Triage Type: Feature request
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
github/copilot-sdk#2760 ·