User-visible changes in @endo/common
:
throwLabeled
parameterized error construction- Like the assertion functions/methods that were parameterized by an error
constructor (
makeError
,assert
,assert.fail
,assert.equal
),throwLabeled
now also accepts named optionscause
anderrors
in its immediately succeedingoptions
argument. - Like those assertion functions, the error constructor argument to
throwLabeled
can now be anAggregateError
. IfthrowLabeled
makes an error instance, it encapsulates the non-uniformity of theAggregateError
construction arguments, allowing all the error constructors to be used polymorphically (generic / interchangeable). - The error constructor argument is now typed
GenericErrorConstructor
, effectively the common supertype ofErrorConstructor
andAggregateErrorConstructor
.
- Like the assertion functions/methods that were parameterized by an error
constructor (