MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / CustomError

Function CustomError

libraries/p5.sound.js:617–631  ·  view source on GitHub ↗
(name, errorTrace, failedPath)

Source from the content-addressed store, hash-verified

615 * @return {Error} returns a custom Error object
616 */
617 var CustomError = function (name, errorTrace, failedPath) {
618 var err = new Error();
619 var tempStack, splitStack;
620 err.name = name;
621 err.originalStack = err.stack + errorTrace;
622 tempStack = err.stack + errorTrace;
623 err.failedPath = failedPath;
624 // only print the part of the stack trace that refers to the user code:
625 var splitStack = tempStack.split('\n');
626 splitStack = splitStack.filter(function (ln) {
627 return !ln.match(/(p5.|native code|globalInit)/g);
628 });
629 err.stack = splitStack.join('\n');
630 return err;
631 };
632 return CustomError;
633 }();
634 var panner;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected