Skip to main content

Class: BaseError

The base class for custom errors.

Extends

  • Error

Extended by

Constructors

new BaseError()

new BaseError(message?, param0?): BaseError

Creates an instance of BaseError.

Parameters

ParameterTypeDescription

message?

string

The error message.

param0?

IBaseErrorParameters

The error params.

Returns

BaseError

Overrides

Error.constructor

Defined

@nilfoundation/niljs/src/errors/BaseError.ts:66

Properties

cause?

optional cause: BaseError | Error;

The error cause.

Defined

@nilfoundation/niljs/src/errors/BaseError.ts:42


docsPath?

optional docsPath: string;

The path to the documentation of this error.

Defined

@nilfoundation/niljs/src/errors/BaseError.ts:49


isOperational

isOperational: boolean;

The flag that indicates if this error is operational. This is useful to differentiate operational errors from programming errors. It is recommended to always set this property to true when creating a custom error class.

Defined

@nilfoundation/niljs/src/errors/BaseError.ts:35


message

message: string;

Inherited from

Error.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1077


name

name: string;

Inherited from

Error.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1076


stack?

optional stack: string;

Inherited from

Error.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1078


version?

optional version: string;

The version of the client.

Defined

@nilfoundation/niljs/src/errors/BaseError.ts:53