0
Example, in http requests we can have SocketException
, TimeoutException
,etc.
In I/O operations we also have other possible Exceptions
.
Not to have to treat in a generic way, ex: catch (e)
, how to discover (documentation, etc.) what are the possible Exceptions that can occur taking as an example the cases mentioned above?
In summary for all languages: read the documentation.
– Maniero
https://www.tutorialspoint.com/dart_programming/dart_programming_exceptions.htm
– rubStackOverflow
This is not documentation, it’s bad text on the subject. Documentation is from the API, each has its own.
– Maniero
The official documentation doesn’t help much either (https://api.dart.dev/stable/2.8.4/dart-core/Exception-class.html) .
– rubStackOverflow
Help, have to look from each API, no use looking at the class
Exception
, same error of accepted answer and AP in PHP duplicate I added. No list, impossible to have.– Maniero