EngineHub / EngineHub/CommandHelper

Add tryelse()

Đang mở
#1,196 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
feature request good first issue
Ngôn ngữ chính
Java
Star
128
Fork
70
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.