MCPcopy Index your code
hub / github.com/ampproject/amphtml / handleBundleError

Function handleBundleError

build-system/tasks/helpers.js:211–220  ·  view source on GitHub ↗

* Handles a bundling error * @param {Error} err * @param {boolean} continueOnError * @param {string} destFilename

(err, continueOnError, destFilename)

Source from the content-addressed store, hash-verified

209 * @param {string} destFilename
210 */
211function handleBundleError(err, continueOnError, destFilename) {
212 const message = err.stack || err.toString();
213 log(red('ERROR:'), message, '\n');
214 const reasonMessage = `Could not compile ${cyan(destFilename)}`;
215 if (continueOnError) {
216 log(red('ERROR:'), reasonMessage);
217 } else {
218 throw new Error(reasonMessage);
219 }
220}
221
222/**
223 * Performs the final steps after a JS file is bundled and optionally minified

Callers 1

esbuildCompileFunction · 0.85

Calls 4

redFunction · 0.85
cyanFunction · 0.85
logFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected