guardResult<S> function
Implementation
@pragma("vm:prefer-inline")
Result<S, Object> guardResult<S>(Result<S, Object> Function() func) {
try {
return func();
} catch (e) {
return Err(e);
}
}
@pragma("vm:prefer-inline")
Result<S, Object> guardResult<S>(Result<S, Object> Function() func) {
try {
return func();
} catch (e) {
return Err(e);
}
}