String exceptionToString(exception, [ stackTrace = null, String reason = null ])

Source

static String exceptionToString(dynamic exception,
    [dynamic stackTrace = null, String reason = null]) {
  var l = new _ArrayLogger();
  var e = new ExceptionHandler(l, false);
  e.call(exception, stackTrace, reason);
  return l.res.join("\n");
}