function checkUncaught(fnReporter) {
		var sId,
			iLength = Object.keys(mUncaughtById).length
				+ (mUncaughtPromise2Reason ? mUncaughtPromise2Reason.size : 0),
			sMessage = "Uncaught (in promise): " + iLength + " times\n",
			oPromise,
			vReason,
			oResult,
			itValues;

		if (iLength) {
			for (sId in mUncaughtById) {
				oPromise = mUncaughtById[sId];
				if (oPromise.getResult() && oPromise.getResult().stack) {
					sMessage += oPromise.getResult().stack;
				} else {
					sMessage += oPromise.getResult();
				}
				if (oPromise.$error.stack) {
					sMessage += "\n>>> SyncPromise rejected with above reason...\n"
						+ oPromise.$error.stack.split("\n").slice(2).join("\n"); // hide listener
				}
				sMessage += "\n\n";
			}
			mUncaughtById = {};

			//TODO for (let vReason of mUncaughtPromise2Reason.values()) {...}
			if (mUncaughtPromise2Reason && mUncaughtPromise2Reason.size) {
				itValues = mUncaughtPromise2Reason.values();
				for (;;) {
					oResult = itValues.next();
					if (oResult.done) {
						break;
					}
					vReason = oResult.value;
					sMessage += (vReason && vReason.stack || vReason) + "\n\n";
				}
				mUncaughtPromise2Reason.clear();
			}

			if (fnReporter) {
				fnReporter(sMessage);
			} else if (bInfo) {
				jQuery.sap.log.info("Clearing " + iLength + " uncaught promises", sMessage,
					sClassName);
			}
		}
	}
/**
	 * Check for uncaught errors in sync promises and provide an appropriate report to the given
	 * optional reporter.
	 *
	 * @param {function} [fnReporter]
	 *   Optional reporter to receive a report
	 */
Check for uncaught errors in sync promises and provide an appropriate report to the given
optional reporter.

@param {function} [fnReporter]
Optional reporter to receive a report
Check for uncaught errors in sync promises and provide an appropriate report to the given optional reporter . @param { function } [ fnReporter ] Optional reporter to receive a report
function checkUncaught(fnReporter) {
		var sId,
			iLength = Object.keys(mUncaughtById).length
				+ (mUncaughtPromise2Reason ? mUncaughtPromise2Reason.size : 0),
			sMessage = "Uncaught (in promise): " + iLength + " times\n",
			oPromise,
			vReason,
			oResult,
			itValues;
		if (iLength) {
			for (sId in mUncaughtById) {
				oPromise = mUncaughtById[sId];
				if (oPromise.getResult() && oPromise.getResult().stack) {
					sMessage += oPromise.getResult().stack;
				} else {
					sMessage += oPromise.getResult();
				}
				if (oPromise.$error.stack) {
					sMessage += "\n>>> SyncPromise rejected with above reason...\n"
						+ oPromise.$error.stack.split("\n").slice(2).join("\n"); 
				}
				sMessage += "\n\n";
			}
			mUncaughtById = {};
			if (mUncaughtPromise2Reason && mUncaughtPromise2Reason.size) {
				itValues = mUncaughtPromise2Reason.values();
				for (;;) {
					oResult = itValues.next();
					if (oResult.done) {
						break;
					}
					vReason = oResult.value;
					sMessage += (vReason && vReason.stack || vReason) + "\n\n";
				}
				mUncaughtPromise2Reason.clear();
			}
			if (fnReporter) {
				fnReporter(sMessage);
			} else if (bInfo) {
				jQuery.sap.log.info("Clearing " + iLength + " uncaught promises", sMessage,
					sClassName);
			}
		}
	}
function checkUncaught ( fnReporter ) { var sId , iLength = Object . keys ( mUncaughtById ) . length + ( mUncaughtPromise2Reason ? mUncaughtPromise2Reason . size : 0 ) , sMessage = "Uncaught (in promise): " + iLength + " times\n" , oPromise , vReason , oResult , itValues ; if ( iLength ) { for ( sId in mUncaughtById ) { oPromise = mUncaughtById [ sId ] ; if ( oPromise . getResult ( ) && oPromise . getResult ( ) . stack ) { sMessage += oPromise . getResult ( ) . stack ; } else { sMessage += oPromise . getResult ( ) ; } if ( oPromise . $error . stack ) { sMessage += "\n>>> SyncPromise rejected with above reason...\n" + oPromise . $error . stack . split ( "\n" ) . slice ( 2 ) . join ( "\n" ) ; } sMessage += "\n\n" ; } mUncaughtById = { } ; if ( mUncaughtPromise2Reason && mUncaughtPromise2Reason . size ) { itValues = mUncaughtPromise2Reason . values ( ) ; for ( ; ; ) { oResult = itValues . next ( ) ; if ( oResult . done ) { break ; } vReason = oResult . value ; sMessage += ( vReason && vReason . stack || vReason ) + "\n\n" ; } mUncaughtPromise2Reason . clear ( ) ; } if ( fnReporter ) { fnReporter ( sMessage ) ; } else if ( bInfo ) { jQuery . sap . log . info ( "Clearing " + iLength + " uncaught promises" , sMessage , sClassName ) ; } } }
Check for uncaught errors in sync promises and provide an appropriate report to the given
 optional reporter.
Check for uncaught errors in sync promises and provide an appropriate report to the given optional reporter .
// hide listener //TODO for (let vReason of mUncaughtPromise2Reason.values()) {...}