UNPKG

universal-common

Version:

Library that provides useful missing base class library functionality.

14 lines 442 B
/** * Error thrown when a method call is invalid for the object's current state. * @extends {Error} */ export default class InvalidOperationError extends Error { /** * Creates a new InvalidOperationError instance. * @param {string} message - The error message describing why the operation is invalid. */ constructor(message) { super(message); this.name = "InvalidOperationError"; } }