1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-09-16 10:51:42 +02:00

Attach error message as context

This commit is contained in:
mo8it 2024-08-08 22:37:56 +02:00
parent 8df66f7991
commit 34f02cf83d

View File

@ -102,8 +102,7 @@ pub fn watch(
watch_state.render()?;
}
WatchEvent::NotifyErr(e) => {
watch_state.into_writer().write_all(NOTIFY_ERR.as_bytes())?;
return Err(Error::from(e));
return Err(Error::from(e).context(NOTIFY_ERR));
}
WatchEvent::TerminalEventErr(e) => {
return Err(Error::from(e).context("Terminal event listener failed"));