looksLikeConnectionLoss function
A read that failed because the VM service went away, whatever wrapper it arrived in.
Implementation
bool looksLikeConnectionLoss(Object e) {
final m = e.toString();
return e is RuntimeConnectionLostError ||
m.contains('RuntimeConnectionLostError') ||
m.contains('Service has disappeared') ||
m.contains('Service connection disposed') ||
m.contains('VM service is not connected');
}