safely function
Execute block
, ignoring any exceptions, merely logging them via logError
.
Implementation
safely(Function block) {
try {
block();
} catch (it, trace) {
logError("safely failed - ignored: $it", trace);
}
}
Execute block
, ignoring any exceptions, merely logging them via logError
.
safely(Function block) {
try {
block();
} catch (it, trace) {
logError("safely failed - ignored: $it", trace);
}
}