UNPKG

@estarlincito/utils

Version:

A collection of utility functions designed to simplify and speed up development tasks in JavaScript and TypeScript projects.

18 lines (17 loc) 367 B
class s extends Error { /** * Creates an instance of `AppError`. * * @param {string} message - The error message. * @param {string} [code] - An optional error code to categorize the error. */ constructor(r, e) { super(r), this.code = e, this.name = "AppError"; } } const t = (o, r) => { throw new s(o, r); }; export { t as handleError };