MCPcopy
hub / github.com/ampproject/amphtml / prepareError_

Method prepareError_

third_party/subscriptions-project/config.js:550–558  ·  view source on GitHub ↗

* Modifies an error before reporting, such as to add metadata. * @param {!Error} error * @private

(error)

Source from the content-addressed store, hash-verified

548 * @private
549 */
550 prepareError_(error) {
551 if (this.suffix_) {
552 if (!error.message) {
553 error.message = this.suffix_;
554 } else if (error.message.indexOf(this.suffix_) === -1) {
555 error.message = this.suffix_;
556 }
557 }
558 }
559
560 /**
561 * Creates an error.

Callers 2

createErrorMethod · 0.95
createExpectedErrorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected