UNPKG

msc-node

Version:

mediasoup client side Node.js library

40 lines (39 loc) 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InvalidStateError = exports.UnsupportedError = void 0; /** * Error indicating not support for something. */ class UnsupportedError extends Error { constructor(message) { super(message); this.name = 'UnsupportedError'; if (Error.hasOwnProperty('captureStackTrace')) // Just in V8. { // @ts-ignore Error.captureStackTrace(this, UnsupportedError); } else { this.stack = (new Error(message)).stack; } } } exports.UnsupportedError = UnsupportedError; /** * Error produced when calling a method in an invalid state. */ class InvalidStateError extends Error { constructor(message) { super(message); this.name = 'InvalidStateError'; if (Error.hasOwnProperty('captureStackTrace')) // Just in V8. { // @ts-ignore Error.captureStackTrace(this, InvalidStateError); } else { this.stack = (new Error(message)).stack; } } } exports.InvalidStateError = InvalidStateError;