UNPKG

@datastax/astra-db-ts

Version:
27 lines (26 loc) 1.11 kB
"use strict"; // Copyright Datastax, Inc // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.InvalidEnvironmentError = void 0; class InvalidEnvironmentError extends Error { constructor(operation, currentEnvironment, expectedEnvironments, extra) { super(`Invalid environment '${currentEnvironment}' for operation '${operation}' (${extra}); expected environment(s): ${expectedEnvironments.map(e => `'${e}'`).join(', ')}`); Object.defineProperty(this, "currentEnvironment", { enumerable: true, configurable: true, writable: true, value: void 0 }); Object.defineProperty(this, "expectedEnvironments", { enumerable: true, configurable: true, writable: true, value: void 0 }); this.currentEnvironment = currentEnvironment; this.expectedEnvironments = expectedEnvironments; this.name = 'InvalidEnvironmentError'; } } exports.InvalidEnvironmentError = InvalidEnvironmentError;