Endo API documentation - v0.2.0 / Exports / @endo/common / throw-labeled
Module: throw-labeled
Table of contents
Functions
Functions
throwLabeled
▸ throwLabeled(innerErr
, label
, errConstructor?
, options?
): never
Given an error innerErr
and a label
, throws a similar error whose message string is ${label}: ${innerErr.message}
. See applyLabelingError
for the motivating use.
Parameters
Name | Type | Default value |
---|---|---|
innerErr | Error | undefined |
label | string | number | undefined |
errConstructor? | GenericErrorConstructor | undefined |
options? | AssertMakeErrorOptions | undefined |
Returns
never