MCPcopy Index your code
hub / github.com/webpack/webpack-dev-server / handleError

Function handleError

client-src/overlay.js:681–703  ·  view source on GitHub ↗
(error, fallbackMessage)

Source from the content-addressed store, hash-verified

679 * @param {string} fallbackMessage fallback message
680 */
681 const handleError = (error, fallbackMessage) => {
682 const errorObject =
683 error instanceof Error
684 ? error
685 : new Error(error || fallbackMessage, { cause: error });
686
687 const shouldDisplay =
688 typeof options.catchRuntimeError === "function"
689 ? options.catchRuntimeError(errorObject)
690 : true;
691
692 if (shouldDisplay) {
693 overlayService.send({
694 type: "RUNTIME_ERROR",
695 messages: [
696 {
697 message: errorObject.message,
698 stack: parseErrorToStacks(errorObject),
699 },
700 ],
701 });
702 }
703 };
704
705 listenToRuntimeError((errorEvent) => {
706 // error property may be empty in older browser like IE

Callers 1

createOverlayFunction · 0.85

Calls 1

parseErrorToStacksFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…