UNPKG

@avolutions/canvas-painter

Version:

CanvasPainter.js is a simple yet powerful JavaScript library for drawing basic shapes (rectangles, circles, etc.) on HTML5 Canvas with ease. Perfect for creating 2D graphics in your web projects.

17 lines (16 loc) 595 B
/** * Custom error to represent invalid constructor arguments. * This error is thrown when arguments passed to a constructor * do not meet the expected types or values. */ export class InvalidConstructorArgumentsError extends Error { /** * Creates a new `InvalidConstructorArgumentsError` instance. * * @param message - The error message to display. Defaults to "Invalid arguments passed to constructor". */ constructor(message = "Invalid arguments passed to constructor") { super(message); this.name = "InvalidConstructorArgumentsError"; } }