UNPKG

rjweb-server

Version:

Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS

19 lines (18 loc) 504 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class RuntimeError { /** * Create a new Runtime Error * @since 9.0.0 */ constructor(cause, error) { this.cause = cause; this.error = error; } /** * Get the Error message * @since 9.0.0 */ toString() { return `(${this.cause})\n\n${this.error instanceof Error ? this.error.stack ?? this.error.message : String(this.error)}`; } } exports.default = RuntimeError;