UNPKG

@worker-tools/deno-kv-storage

Version:

An implementation of the StorageArea (1,2,3) interface for Deno with an extensible system for supporting various database backends.

47 lines 1.54 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TransactionError = exports.PostgresError = exports.ConnectionParamsError = exports.ConnectionError = void 0; class ConnectionError extends Error { constructor(message) { super(message); this.name = "ConnectionError"; } } exports.ConnectionError = ConnectionError; class ConnectionParamsError extends Error { constructor(message) { super(message); this.name = "ConnectionParamsError"; } } exports.ConnectionParamsError = ConnectionParamsError; class PostgresError extends Error { constructor(fields) { super(fields.message); Object.defineProperty(this, "fields", { enumerable: true, configurable: true, writable: true, value: void 0 }); this.fields = fields; this.name = "PostgresError"; } } exports.PostgresError = PostgresError; // TODO // Use error cause once it's added to JavaScript class TransactionError extends Error { constructor(transaction_name, cause) { super(`The transaction "${transaction_name}" has been aborted due to \`${cause}\`. Check the "cause" property to get more details`); Object.defineProperty(this, "cause", { enumerable: true, configurable: true, writable: true, value: cause }); this.name = "TransactionError"; } } exports.TransactionError = TransactionError; //# sourceMappingURL=error.js.map