toString method

  1. @override
String toString()
override

The string representation of this exception for debugging.

Returns the runtime type name followed by message, making it easy to identify the specific exception subclass in logs.

Example output:

NetworkAppException: Failed to connect to server
ValidationException: Invalid email format

Implementation

@override
String toString() {
  return '$runtimeType: $message';
}