(name, errorTrace, failedPath)
| 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; |
nothing calls this directly
no outgoing calls
no test coverage detected