Log Throwables that happened during the build to the outErr of the BlazeCommandDispatcher. This way they can be logged in the BEP.
@@ -491,6 +491,9 @@ public class BlazeCommandDispatcher {
}
return result;
} catch (Throwable e) {
+ outErr.printErr(
+ "Internal error thrown during build. Printing stack trace: "
+ + Throwables.getStackTraceAsString(e));
e.printStackTrace();
BugReport.printBug(outErr, e);
BugReport.sendBugReport(e, args, env.getCrashData());
