EngineHub / EngineHub/CommandHelper
Add tryelse()
Offen
feature request
good first issue
- Vorherrschende Sprache
- Java
- Sterne
- 128
- Forks
- 70
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.