UNPKG

dewy

Version:

Dewy(dǝw-y) is a minimalist HTTP server framework with a small codebase, utilizing built-in URLPattern for efficient routing.

22 lines (21 loc) 646 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ServerError = void 0; class ServerError extends Error { constructor(messageOrError, init) { super(typeof messageOrError === "string" ? messageOrError : messageOrError.message); Object.defineProperty(this, "init", { enumerable: true, configurable: true, writable: true, value: init }); if (messageOrError instanceof Error) { this.cause = messageOrError; } this.name = "ServerError"; } } exports.ServerError = ServerError;