The component implementation didn't have support for either the test-fatalerror-config feature, or the ability to treat the Error::FatalError variant as a trap. This PR fixes that by doing the following:
Allowing header_values_get to trap based on the test-fatalerror-config feature
Introducing the TrappableError type for treating FatalError as a trap
Adding a variant of the trap-test that uses the component adapter
The remaining difference to the wiggle implementation is that only functions listed in trappable_errors will be able to emit traps for FatalError, though the only case we currently use that in is for test-fatalerror-config, so it seemed reasonable to not switch everything to TrappableError.
The component implementation didn't have support for either the
test-fatalerror-config
feature, or the ability to treat theError::FatalError
variant as a trap. This PR fixes that by doing the following:header_values_get
to trap based on thetest-fatalerror-config
featureTrappableError
type for treatingFatalError
as a traptrap-test
that uses the component adapterThe remaining difference to the wiggle implementation is that only functions listed in
trappable_errors
will be able to emit traps forFatalError
, though the only case we currently use that in is fortest-fatalerror-config
, so it seemed reasonable to not switch everything toTrappableError
.