Skip to content

Replace console.error with friendly error system #6630

@shashank-iitbhu

Description

@shashank-iitbhu

Increasing Access

Many functions inside src/webgl and lib/addons currently uses console.error to report errors. It would be more user-friendly and consistent with the p5.js environment to replace these calls with the friendly error system (FES).

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)

Feature enhancement details

For example, take parseASCIISTL function in webgl/loading.js,
I have triggered an error condition and the results,



with console.error:
Screenshot 2023-12-13 at 10 41 06 PM



with FES:
Screenshot 2023-12-13 at 10 42 01 PM
It would be more user-friendly and consistent with the p5.js environment to replace these calls with the friendly error system (FES).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions