wrap static method

ResourceException wrap(
  1. dynamic e
)

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);
}