Skip to content

p5.RendererGL: replace console.log/warn with Friendly Error System (FES) #8591

@MASTERsj01

Description

@MASTERsj01

Increasing access

p5.RendererGL.js has 6 console.log/warn and p5.RendererGL.Immediate.js has 2 — covering setAttributes, loadPixels, blendMode, dimension limits, tesselation, vertex texture, and instancing warnings. These should use p5._friendlyError() for FES consistency.

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)

Feature enhancement details

src/webgl/p5.RendererGL.js and src/webgl/p5.RendererGL.Immediate.js use console.log and console.warn instead of p5._friendlyError() in several places:

p5.RendererGL.js (6 calls):

  • Line 269: console.log in setAttributes() — non-WEBGL renderer warning
  • Line 957: console.warn — hardware dimension limit warning
  • Line 1362: console.warn in blendMode() — unsupported 2D-only modes
  • Line 1532: console.log in loadPixels() — preserveDrawingBuffer warning
  • Lines 2605, 2610-2611: console.log in tesselation callbacks

p5.RendererGL.Immediate.js (2 calls):

  • Line 148: console.warn in vertex() — missing texture() call
  • Line 546: console.log — WebGL2 instancing warning

These should use p5._friendlyError() for consistency with the rest of the codebase.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions