format method

String format (StackTrace stackTrace, { bool terse: true })

Returns a human-readable representation of stackTrace. If terse is set, this folds together multiple stack frames from the Dart core libraries, so that only the core library method directly called from user code is visible (see Trace.terse).

Implementation

static String format(StackTrace stackTrace, {bool terse: true}) {
  var trace = new Trace.from(stackTrace);
  if (terse) trace = trace.terse;
  return trace.toString();
}