throwIfNeeded static method

void throwIfNeeded(
  1. Iterable<FreemeworkException> innerExceptions
)

Implementation

static void throwIfNeeded(Iterable<FreemeworkException> innerExceptions) {
  if (innerExceptions.isNotEmpty) {
    if (innerExceptions.length == 1) {
      throw innerExceptions.first;
    }
    throw AggregateException(innerExceptions);
  }
}