Don't swallow manifest merging errors from the tool in ManifestMergerAction.
Fixes
Related, but does not fully address:
RELNOTES: Fixed issue where error messages from Android manifest merging actions were not propagated fully.
@@ -228,10 +228,13 @@ public class ManifestMergerAction {
Files.copy(manifest, options.manifestOutput, StandardCopyOption.REPLACE_EXISTING);
}
} catch (AndroidManifestProcessor.ManifestProcessingException e) {
- System.exit(1);
+ // We special case ManifestProcessingExceptions here to indicate that this is
+ // caused by a build error, not an Bazel-internal error.
+ logger.log(SEVERE, "Error during merging manifests", e);
+ System.exit(1); // Don't duplicate the error to the user or bubble up the exception.
} catch (Exception e) {
logger.log(SEVERE, "Error during merging manifests", e);
- throw e;
+ throw e; // This is a proper internal exception, so we bubble it up.
}
}
}
