EngineHub / EngineHub/CommandHelper

Add tryelse()

オープン
#1,196 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
feature request good first issue
主要言語
Java
スター
128
フォーク
70
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。