MCPcopy Create free account
hub / github.com/hashintel/hash / eyre

Function eyre

libs/error-stack/tests/test_compatibility.rs:146–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144 ignore = "bug: miri is failing for `eyre`, this is unrelated to our implementation"
145)]
146fn eyre() {
147 install_eyre_hook();
148
149 let eyre: Result<(), _> = Err(eyre::eyre!(RootError)
150 .wrap_err(PrintableA(0))
151 .wrap_err(PrintableB(0)));
152
153 let report = create_report().attach(PrintableA(0)).attach(PrintableB(0));
154 let report_messages = messages(&report);
155
156 let eyre_report = eyre.into_report().expect_err("should have returned error");
157 let eyre_messages = messages(&eyre_report);
158
159 assert_eq!(
160 remove_builtin_messages(eyre_messages.into_iter().rev()),
161 remove_builtin_messages(report_messages),
162 );
163}
164
165#[test]
166#[cfg(all(nightly, feature = "eyre", feature = "backtrace"))]

Callers

nothing calls this directly

Calls 8

install_eyre_hookFunction · 0.85
ErrInterface · 0.85
PrintableAClass · 0.85
PrintableBClass · 0.85
messagesFunction · 0.85
create_reportFunction · 0.70
attachMethod · 0.45
into_reportMethod · 0.45

Tested by

no test coverage detected