import { ErrBase } from "https://deno.land/x/rimbu@0.13.0/common/index.ts";
const { msg } = ErrBase;
Returns a function that, when called, throws an Err.ForcedError
with the given message
string.
Examples
Example 1
Example 1
const emptyMap = HashMap.empty<number, string>()
emptyMap.get(5, ErrBase.msg('not found'));
// throws: Err.CustomError(message: 'not found')