about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-01-17 12:12:46 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-01-18 10:49:32 -0800
commit27843133448df3315af1a07dc6700d7754709a97 (patch)
tree9280de945155c54f99d1ee6abfc6baa56097e6f9 /src/rustllvm/RustWrapper.cpp
parentf3f2e697d8d21190bb99e86bae2de39f012162aa (diff)
downloadrust-27843133448df3315af1a07dc6700d7754709a97.tar.gz
rust-27843133448df3315af1a07dc6700d7754709a97.zip
rustc: Clean up error reporting
This commit re-works how the monitor() function works and how it both receives
and transmits errors. There are a few cases in which the compiler can abort:

1. A normal compiler error. In this case, the compiler raises a FatalError as
   the failure value of the task. If this happens, then the monitor task does
   nothing. It ignores all stderr output of the child task and it also
   suppresses the failure message of the main task itself. This means that on a
   normal compiler error just the error message itself is printed.

2. A normal internal compiler error. These are invoked from sess.span_bug() and
   friends. In these cases, they follow the same path (raising a FatalError),
   but they will also print an ICE message which has a URL to go report a bug.

3. An actual compiler bug. This happens whenever anything calls fail!() instead
   of going through the session itself. In this case, we print out stuff about
   RUST_LOG=2 and we by default capture all stderr and print via warn!() so it's
   only printed out with the RUST_LOG var set.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions