UNPKG

@decaf-ts/db-decorators

Version:

Agnostic database decorators and repository

71 lines (70 loc) 1.58 kB
/** * @summary Base Error * * @param {string} msg the error message * * @class BaseDLTError * @extends Error */ export declare abstract class BaseError extends Error { readonly code: number; protected constructor(name: string, msg: string | Error, code?: number); } /** * @summary Represents a failure in the Model details * * @param {string} msg the error message * * @class ValidationError * @extends BaseError */ export declare class ValidationError extends BaseError { constructor(msg: string | Error); } /** * @summary Represents an internal failure (should mean an error in code) * * @param {string} msg the error message * * @class InternalError * @extends BaseError */ export declare class InternalError extends BaseError { constructor(msg: string | Error); } /** * @summary Represents a failure in the Model de/serialization * * @param {string} msg the error message * * @class SerializationError * @extends BaseError * */ export declare class SerializationError extends BaseError { constructor(msg: string | Error); } /** * @summary Represents a failure in finding a model * * @param {string} msg the error message * * @class NotFoundError * @extends BaseError * */ export declare class NotFoundError extends BaseError { constructor(msg: string | Error); } /** * @summary Represents a conflict in the storage * * @param {string} msg the error message * * @class ConflictError * @extends BaseError * */ export declare class ConflictError extends BaseError { constructor(msg: string | Error); }