Skip to main content

foundation-utils.defaulterrormap

Home > @genesislcap/foundation-utils > DefaultErrorMap

DefaultErrorMap class​

Signature:

export declare class DefaultErrorMap<TErrorDetailMap extends ErrorDetailMap> implements ErrorMap<TErrorDetailMap> 

Implements: ErrorMap<TErrorDetailMap>

Constructors​

Constructor

Modifiers

Description

(constructor)(logger)

Constructs a new instance of the DefaultErrorMap class

Properties​

Property

Modifiers

Type

Description

lastError

Error

The last set error if any.

messages

readonly

string

Error map as messages.

size

readonly

number

The size of the error map.

Methods​

Method

Modifiers

Description

clear()

Clear errors.

delete(key)

Delete an error.

get(key)

Get an error by key.

has(key)

Has an error for key.

set(key, error)

Set an error by key.

values()