forked from mozilla/sccache
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Catch panics in the server and transmit them as errors to the client.
Currently, when the server panics, the client never gets a response, and the compilation gets stuck. The only indication of something going wrong is in the logs if they are enabled. With this change, the error is transmitted to the client, which then fails and prints it. For instance, one of the out-of-bound accesses fixed in mozilla#1980 now prints this on the client side before returning a non-zero exit code: sccache: encountered fatal error sccache: error: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1 sccache: caused by: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1 Fixes mozilla#756
- Loading branch information
Showing
1 changed file
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters