UNPKG

whatsauto.js

Version:

Easy WhatsApp Automation with Session

21 lines (20 loc) 632 B
export class AutoWAError extends Error { constructor(message) { super(message); this.name = "AutoWAError"; Object.setPrototypeOf(this, AutoWAError.prototype); } static isAutoWAError(error) { return error instanceof AutoWAError || error instanceof Error; } } export class ValidationError extends Error { constructor(message) { super(message); this.name = "ValidationError"; Object.setPrototypeOf(this, ValidationError.prototype); } static isValidationError(error) { return error instanceof ValidationError || error instanceof Error; } }