Files
freeCodeCamp/guide/arabic/javascript/standard-objects/promise/promise-reject/index.md
2018-10-16 21:32:40 +05:30

585 B

title, localeTitle
title localeTitle
Promise Reject وعد رفض

وعد رفض

إرجاع دالة Promise.reject شرط خطأ إلى الدالة الاستدعاء. يأخذ معلمة واحدة ، كائن خطأ أو قيمة ، كسبب للرفض.

سيسمح لك تسلسل وظيفة catch في نهاية المتصل Promise بالتقاط حالة الخطأ.

promiseCallingFunction(paramList) .then( ... ) ... .then( ... ) .catch( function(err) { // catch function /* * this is where you can access the reason for the rejection */ });