EngineHub / EngineHub/CommandHelper

Add tryelse()

Aperta
#1,196 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature request good first issue
Lingua principale
Java
Stelle
128
Fork
70
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.