toString method
- @override
override
String representation of the exception.
Implementation
@override
String toString() {
var message = 'exception ${exception.runtimeType}: $exception';
final e = exception;
if (e is SocketException) {
if (e.message == '' &&
e.osError != null &&
e.osError.errorCode == 61 &&
e.osError.message == 'Connection refused') {
// Known situation: more compact error message
message = 'cannot connect';
}
}
return 'proxy: $message: $targetUri';
}