-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Milestone
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build Process
- Unit Testing
- Internalization
- Friendly Errors
- Other (specify if possible)
p5.js version
main branch
Web browser and version
Firefox 108.0
Operating System
macOS 12.5.1
Steps to reproduce this
In #6088 we noticed that errors thrown from within a p5 class aren't registered as being internal from FES. This seems to be because the source name in the stacktrace look different when inside an ES6 class and do not include the class name.
e.g. before: (source includes _main.default.Element.prototype)

after: (source does not include the class)

We may need to either update our babel configuration to output the same code structure as before, or update the way we check if an error is internal, which currently happens here:
p5.js/src/core/friendly_errors/fes_core.js
Line 507 in ab3e2ad
| if (stacktrace[j].functionName.search('_main.default') !== -1) { |
Reactions are currently unavailable