UNPKG

@iotile/iotile-device

Version:

A typescript library for interfacing with IOTile BLE devices

37 lines 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class BaseError { constructor(message) { this.message = message; } } exports.BaseError = BaseError; class RPCNotFound extends BaseError { constructor(address, rpcID) { super(`Cannot find RPC (address: ${address} and id: ${rpcID})`); this.address = address; this.rpcID = rpcID; } } exports.RPCNotFound = RPCNotFound; class RPCArgumentsIncorrect extends BaseError { constructor(address, rpcID, expectedFormat, args) { super(`Attempted to call RPC (address: ${address}, id: ${rpcID}) with incompatible arguments, expected ${expectedFormat}`); this.address = address; this.rpcID = rpcID; this.expectedFormat = expectedFormat; this.args = args; } } exports.RPCArgumentsIncorrect = RPCArgumentsIncorrect; class RPCResponseIncorrect extends BaseError { constructor(address, rpcID, expectedFormat, response) { super(`RPC implementation (address: ${address}, id: ${rpcID}) returned an incompatible response, expected ${expectedFormat}`); this.address = address; this.rpcID = rpcID; this.expectedFormat = expectedFormat; this.response = response; } } exports.RPCResponseIncorrect = RPCResponseIncorrect; //# sourceMappingURL=errors.js.map