Skip to content
Snippets Groups Projects
Commit cc35a48a authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Report process output decoding errors in context

It turns out that in rawSystemStdInOut any IO errors, including text
decoding, occurring while collecting the output (stderr or stdout) do
not get reported immediately, but only later if/when the output is
consumed. This is because the exceptions happened in the threads forked
to force the output, but if the main thread looks at the output later
then the exception is reported again.

This leads to very confusing results. In particular we had a case where
the configure process did not fail until writing out the LocalBuildInfo
because that was the first point that forced the output. So the distance
from when the exception really occurred and the fact that the exception
message does not include the name of the program run means that this is
then a pain to track down.

This patch makes sure that any exceptions arising from forcing the
program output occur immediately and with an error message that includes
the name of the program in question.
parent 41714567
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment