LocalCasStagedDirectory: Add error handling to `captureDirectory()`

Throw an exception instead of ignoring errors from CaptureTree gRPC calls. The error handling matches the behaviour of captureFile().

This makes it easier to debug issues such as https://github.com/apache/buildstream/issues/1465

Merge request reports

Loading