Skip to content

[p5.js 2.0 Bug Report]: Using the 2.x minified build triggers errors instead of the Friendly Errors shown in the full p5.js library. #8241

@perminder-17

Description

@perminder-17

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
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.x

Web browser and version

FireFox

Operating system

Linux

Steps to reproduce this

Steps:

  1. Go to p5.js web-editor.
  2. Switch the project to p5.js v2.x and select the minified build instead of the full library.
  3. Create a sketch that would normally trigger a Friendly Error (FES) and Run the sketch.

Observed behaviour:

  • The console shows: TypeError: e._friendlyError is not a function.
  • Execution is blocked.

Expected Behavior

  • No runtime error should be thrown.
  • The Friendly Error System should suppress/block nothing and allow the sketch to continue running.

Snippet:

function setup() {
  createCanvas(100, 100, WEBGL);
  box(50);                 
  setAttributes('antialias', true); 
}

function draw() {
  background(255);
  rotateZ(frameCount * 0.02);
  rotateX(frameCount * 0.02);
  rotateY(frameCount * 0.02);
  fill(0);
  box(50);
}

Here's the sketch : https://editor.p5js.org/aman12345/sketches/HzJz4-R6t

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Completed

Relationships

None yet

Development

No branches or pull requests

Issue actions