wrap static method
Implementation
static ResourceException wrap(dynamic e) {
if (e is ResourceException) {
return e;
}
// if (e is CancellationException) {
// return cancelled;
// }
if (e is OutOfMemoryError) {
return outOfMemory(e);
}
return other(e);
}