File tree Expand file tree Collapse file tree 1 file changed +18
-19
lines changed Expand file tree Collapse file tree 1 file changed +18
-19
lines changed Original file line number Diff line number Diff line change @@ -1830,35 +1830,34 @@ try {
1830
1830
}
1831
1831
```
1832
1832
1833
- ### Don't ignore rejected promises
1834
- For the same reason you shouldn't ignore caught errors
1835
- from ` try/catch ` .
1833
+ ### Promise Hatalarını Görmezden Gelmeyin
1834
+ Aynı sebepten dolay ` try/catch ` 'ten kaynaklanan hataları gözardı etmemelisiniz.
1836
1835
1837
1836
** Kötü:**
1838
1837
``` javascript
1839
- getdata ()
1840
- .then ((data ) => {
1841
- functionThatMightThrow (data );
1838
+ verileriGetir ()
1839
+ .then ((veri ) => {
1840
+ fonksiyonHataFirlatabilir (veri );
1842
1841
})
1843
- .catch ((error ) => {
1844
- console .log (error );
1842
+ .catch ((hata ) => {
1843
+ console .log (hata );
1845
1844
});
1846
1845
```
1847
1846
1848
1847
** İyi:**
1849
1848
``` javascript
1850
- getdata ()
1851
- .then ((data ) => {
1852
- functionThatMightThrow (data );
1849
+ verileriGetir ()
1850
+ .then ((veri ) => {
1851
+ fonksiyonHataFirlatabilir (veri );
1853
1852
})
1854
- .catch ((error ) => {
1855
- // One option (more noisy than console.log):
1856
- console .error (error );
1857
- // Another option :
1858
- notifyUserOfError (error );
1859
- // Another option :
1860
- reportErrorToService (error );
1861
- // OR do all three !
1853
+ .catch ((hata ) => {
1854
+ // İlk seçenek ( console.log'dan daha çok bilgilendirici ):
1855
+ console .error (hata );
1856
+ // Diğer Seçenek :
1857
+ kullaniciyaHataGoster (hata );
1858
+ // Diğer Seçenek :
1859
+ hatayiServiseBildir (hata );
1860
+ // Ya da üçünü de yapabilirsiniz! !
1862
1861
});
1863
1862
```
1864
1863
You can’t perform that action at this time.
0 commit comments