MCPcopy Index your code
hub / github.com/processing/p5.js / CustomError

Function CustomError

lib/addons/p5.sound.js:1164–1177  ·  view source on GitHub ↗
(name, errorTrace, failedPath)

Source from the content-addressed store, hash-verified

1162
1163
1164var CustomError = function CustomError(name, errorTrace, failedPath) {
1165 var err = new Error();
1166 var tempStack, splitStack;
1167 err.name = name;
1168 err.originalStack = err.stack + errorTrace;
1169 tempStack = err.stack + errorTrace;
1170 err.failedPath = failedPath;
1171
1172 splitStack = tempStack.split('\n').filter(function (ln) {
1173 return !ln.match(/(p5.|native code|globalInit)/g);
1174 });
1175 err.stack = splitStack.join('\n');
1176 return err;
1177};
1178
1179 var errorHandler = (CustomError);
1180

Callers

nothing calls this directly

Calls 2

splitMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected