EngineHub / EngineHub/CommandHelper

Add tryelse()

Abierto
#1,196 0 comentarios 0 reacciones 0 asignados Ver en GitHub
feature request good first issue
Lenguaje dominante
Java
Estrellas
128
Forks
70
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Add a function tryelse, which accepts two statement, trying the first one, and returning it if successful, otherwise, returning the else.

```
string @a = tryelse(functionThatThrows(), 'default');
```
If scream-errors is true, the exception will still be logged.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.