Skip to main content

namespace ErrBase

undocumented

Classes

NameDescription
CustomErrorA custom error instance.
ForcedErrorundocumented

Functions

msg

Returns a function that, when called, throws an Err.ForcedError with the given message string.

Definition

function msg(message: string): () => never;

Parameters

NameTypeDescription
messagestringthe message to put in the Err.ForcedError instance.
example
const emptyMap = HashMap.empty<number, string>()
emptyMap.get(5, ErrBase.msg('not found'));
// throws: Err.CustomError(message: 'not found')