@sv443-network/coreutils
Version:
Cross-platform, general-purpose, JavaScript core library for Node, Deno and the browser. Intended to be used in conjunction with `@sv443-network/userutils` and `@sv443-network/djsutils`, but can be used independently as well.
34 lines (33 loc) • 1.61 kB
TypeScript
/**
* @module Errors
* Contains custom error classes that all have a `date` property set to the time of the error throw
*/
/** Base class for all custom error classes - adds a `date` prop set to the time when the error was thrown */
export declare class DatedError extends Error {
readonly date: Date;
constructor(message: string, options?: ErrorOptions);
}
/** Error while validating checksum - extends {@linkcode DatedError} */
export declare class ChecksumMismatchError extends DatedError {
constructor(message: string, options?: ErrorOptions);
}
/** Custom error class that can have a custom name - extends {@linkcode DatedError} */
export declare class CustomError extends DatedError {
constructor(name: string, message: string, options?: ErrorOptions);
}
/** Error while migrating data - extends {@linkcode DatedError} */
export declare class MigrationError extends DatedError {
constructor(message: string, options?: ErrorOptions);
}
/** Error while validating data - extends {@linkcode DatedError} */
export declare class ValidationError extends DatedError {
constructor(message: string, options?: ErrorOptions);
}
/** Error related to script context (e.g. trying to access APIs that aren't supported by the executing JS engine) - extends {@linkcode DatedError} */
export declare class ScriptContextError extends DatedError {
constructor(message: string, options?: ErrorOptions);
}
/** Error related to networking - extends {@linkcode DatedError} */
export declare class NetworkError extends DatedError {
constructor(message: string, options?: ErrorOptions);
}