Commit 3fbd8ea
Eduardo Bar
docs: fix incorrect example in Don't ignore rejected promises section
The previous Bad example called getdata() (lowercase 'd') inconsistently,
and both Bad and Good examples looked structurally similar, making it
unclear what the actual anti-pattern was.
Changes:
- Fix inconsistent casing: getdata() -> getData() in both examples
- Add an inline comment in the Bad example to explain why console.log()
alone is insufficient — it silently swallows the error without any
visible action or user notification
- Update comment in Good example from 'more noisy' to 'more visible'
which is clearer and less pejorative
This makes the distinction between the two examples obvious:
the Bad example shows error handling that silently swallows details,
while the Good example shows meaningful error handling strategies.
Closes ryanmcdermott#7181 parent 5311f64 commit 3fbd8ea
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2050 | 2050 | | |
2051 | 2051 | | |
2052 | 2052 | | |
2053 | | - | |
| 2053 | + | |
2054 | 2054 | | |
2055 | 2055 | | |
2056 | 2056 | | |
2057 | 2057 | | |
2058 | | - | |
| 2058 | + | |
2059 | 2059 | | |
2060 | 2060 | | |
2061 | 2061 | | |
2062 | 2062 | | |
2063 | 2063 | | |
2064 | 2064 | | |
2065 | | - | |
| 2065 | + | |
2066 | 2066 | | |
2067 | 2067 | | |
2068 | 2068 | | |
2069 | 2069 | | |
2070 | | - | |
| 2070 | + | |
2071 | 2071 | | |
2072 | 2072 | | |
2073 | 2073 | | |
| |||
0 commit comments