CommandHelper

CommandHelper

46.5k Downloads

Add tryelse()

LadyCailin opened this issue ยท 0 comments

commented

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.