Clone
Jendrik Johannes
committed
on 18 Aug 17
Fix failure handling in BuildOperationExecutor
The code block here had a very complicated flow with three nested
tries and finally blocks in… Show more
Fix failure handling in BuildOperationExecutor

The code block here had a very complicated flow with three nested

tries and finally blocks in between. This caused an issue where

the progress logger did not get the information if the operation

was failing. Because it ran in a finally {} block before the catch

block that recorded the failure.

This fixes this issue and also simplifies the code to only use two

try-blocks. The first is there to makes sure to do a proper

cleanup in case an exception is thrown. It does not execute user

coder directly (hence it only has a finally and no catch).

The inner block now only wraps the execution of the build operation

itself (which can contain user code). It catches and records

the failure before it is rethrown.

The corresponding unit test was actually wrong. It is fixed with

this commit.

Show less

green-master + 441 more