Open
Description
In many cases I only care what type of exception I'm getting.
I don't care about the exception at-most I might want to do a e.toString()
.
Example:
for (int i = 0; i < retries; i++) {
try {
return networkOperation().timeout(Duration(seconds: 5));
} on SocketException, TimeoutException {
continue;
}
}
This isn't critical at all, I was just surprised it didn't work already.
It's trivial to duplicate the block handling the exception, or write a function that accepts a list of types to ignore.
Please close if there is some complication to this that I don't see :)