Fix lack of error reporting in SkyframeAwareAction#establishSkyframeDependencies.
RELNOTES: None
@@ -25,6 +25,7 @@ import com.google.devtools.build.lib.actions.Action;
import com.google.devtools.build.lib.actions.ActionCacheChecker.Token;
import com.google.devtools.build.lib.actions.ActionCompletionEvent;
import com.google.devtools.build.lib.actions.ActionExecutedEvent;
+import com.google.devtools.build.lib.actions.ActionExecutedEvent.ErrorTiming;
import com.google.devtools.build.lib.actions.ActionExecutionContext;
import com.google.devtools.build.lib.actions.ActionExecutionException;
import com.google.devtools.build.lib.actions.ActionInput;
@@ -57,6 +58,7 @@ import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.rules.cpp.IncludeScannable;
import com.google.devtools.build.lib.skyframe.ActionRewindStrategy.RewindPlan;
import com.google.devtools.build.lib.util.Pair;
+import com.google.devtools.build.lib.util.io.FileOutErr;
import com.google.devtools.build.lib.util.io.TimestampGranularityMonitor;
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.PathFragment;
@@ -216,7 +218,9 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
} catch (ActionExecutionException e) {
// Remove action from state map in case it's there (won't be unless it discovers inputs).
stateMap.remove(action);
- throw new ActionExecutionFunctionException(e);
+ throw new ActionExecutionFunctionException(
+ skyframeActionExecutor.processAndGetExceptionToThrow(
+ env.getListener(), null, action, e, new FileOutErr(), ErrorTiming.BEFORE_EXECUTION));
}
if (env.valuesMissing()) {
return null;
