Don't hide error info

Summary:
In case the child dies, no error code is reported. Here is an example:
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', hermetic_infra/reverie/reverie-process/src/container.rs:850:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

With this diff, we at least have some more info shown:
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { errno: EINVAL, context: Mount }', hermetic_infra/reverie/reverie-process/src/container.rs:834:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

Reviewed By: jasonwhite

Differential Revision: D35615348

fbshipit-source-id: ad540645a1bb06f275ab43994b1b1f4e9a4fdb1f
This commit is contained in:
Anastasios Andronidis 2022-04-13 16:58:26 -07:00 committed by Facebook GitHub Bot
parent 3a31b92d6c
commit 6cb6d53799

View file

@ -827,7 +827,7 @@ impl Container {
}
Ok(n) => {
// FIXME: Handle errors
let value: Result<T, ()> = bincode::deserialize(&buf[0..n]).unwrap();
let value: Result<T, Error> = bincode::deserialize(&buf[0..n]).unwrap();
Ok(value.unwrap())
}
Err(err) => {