code: function setErrorInfo(promise, errorId, isException) {
          promise._isException = isException || false;
          promise._errorId = errorId;
      }
docs: The difference beween setCompleteValue()/setErrorValue() and complete()/error() is that setXXXValue() moves a promise directly to the success/error state without starting another notification pass (because one is already ongoing).