toString method

  1. @override
String toString()
override

String representation for logging and debugging.

Format: message or type + optional stack trace.

Implementation

@override
String toString() {
  final msg = message ?? '$type';
  return trace != null ? '$msg\n$trace' : msg;
}