Add to the documentation the recommended way and tradeoff for error handling. #5748
Labels
a.language
Relates to the Dart language tour
e2-days
Can complete in < 5 days of normal, not dedicated, work
fix.quality
Needs improvement in copy quality
from.page-issue
Reported in a reader-filed concern
p2-medium
Necessary but not urgent concern. Resolve when possible.
st.triage.ltw
Indicates Lead Tech Writer has triaged
Page URL
https://dart.dev/language/error-handling
Page source
No response
Describe the problem
The page about error handling only talks about Exceptions and Assert. It almost feels like exceptions are "the way" of doing error handling in Dart.
The page should discuss returning null values as errors (Type?) and how to choose when to use exception or null return values. What are the actual trade-offs in terms of performance or maintainability and what does the Dart team recommend?
With the async nature of Dart and the different platforms, I miss a lot of clarity on how to make good error handling in Dart
Expected fix
No response
Additional context
No response
I would like to fix this problem.
The text was updated successfully, but these errors were encountered: