toString method

  1. @override
String toString()

Returns a human-readable string representation of the exception, including the asset path and the underlying cause, if present.

Implementation

@override
String toString() {
  final buffer = StringBuffer('AssetLoaderException: $message');
  buffer.writeln('\nAsset path: $assetPath');
  if (cause != null) {
    buffer.writeln('Caused by: $cause');
  }
  return buffer.toString();
}