UNPKG

homebridge-config-ui-x

Version:

A web based management, configuration and control platform for Homebridge

22 lines (21 loc) 608 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); class WsException extends Error { constructor(error) { super(); this.error = error; this.message = error; } getError() { return this.error; } toString() { const message = this.getErrorString(this.message); return `Error: ${message}`; } getErrorString(target) { return shared_utils_1.isString(target) ? target : JSON.stringify(target); } } exports.WsException = WsException;