format static method

String format(
  1. StackTrace stackTrace, {
  2. 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 = Trace.from(stackTrace);
  if (terse) trace = trace.terse;
  return trace.toString();
}