UNPKG

@dfinity/pic

Version:

An Internet Computer Protocol canister testing library for TypeScript and JavaScript.

55 lines (52 loc) 2.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TopologyValidationError = exports.InstanceDeletedError = exports.ServerRequestTimeoutError = exports.BinTimeoutError = exports.BinNotFoundError = exports.BinStartMacOSArmError = exports.BinStartError = void 0; class BinStartError extends Error { constructor(cause) { super(`There was an error starting the PocketIC Binary. Original error: ${cause.name} ${cause.message}. ${cause.stack}`, { cause }); } } exports.BinStartError = BinStartError; class BinStartMacOSArmError extends Error { constructor(cause) { super(`There was an error starting the PocketIC Binary. It seems you are running on an Apple Silicon Mac. The PocketIC binary can not run with the ARM architecture on Apple Silicon Macs. Please install and enable Rosetta if it is not enabled and try again. Original error: ${cause.name} ${cause.message}. ${cause.stack}`, { cause }); } } exports.BinStartMacOSArmError = BinStartMacOSArmError; class BinNotFoundError extends Error { constructor(picBinPath) { super(`Could not find the PocketIC binary. The PocketIC binary could not be found at ${picBinPath}. Please try installing @dfinity/pic again.`); } } exports.BinNotFoundError = BinNotFoundError; class BinTimeoutError extends Error { constructor() { super('The PocketIC binary took too long to start. Please try again.'); } } exports.BinTimeoutError = BinTimeoutError; class ServerRequestTimeoutError extends Error { constructor() { super('A request to the PocketIC server timed out.'); } } exports.ServerRequestTimeoutError = ServerRequestTimeoutError; class InstanceDeletedError extends Error { constructor() { super('This PocketIC instance has been torn down. Please create a new instance before interacting further with PocketIC.'); } } exports.InstanceDeletedError = InstanceDeletedError; class TopologyValidationError extends Error { constructor() { super('The provided subnet configuration is invalid. At least one subnet must be configured and the number of both application and system subnets must be at least 0 (non-negative).'); } } exports.TopologyValidationError = TopologyValidationError; //# sourceMappingURL=error.js.map