tryRun<T> static method
Implementation
static KResult<T?> tryRun<T>(T? Function() operation, {bool logError = true}) {
try {
return KResult.success(operation());
} catch (e, st) {
return KResult.error(e.toString(), st, logError);
}
}