From 3df19e8e900c0f435923754fee36ca5d6eb8724d Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Wed, 5 Jan 2022 00:06:33 -0800 Subject: [PATCH] Make AndroidCompiledResourceMergingAction worker compatible Calling `System#exit` from within a worker compatible action will shut down unexpectedly. Closes #14424. PiperOrigin-RevId: 419761201 --- .../build/android/AndroidCompiledResourceMergingAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/android/java/com/google/devtools/build/android/AndroidCompiledResourceMergingAction.java b/src/tools/android/java/com/google/devtools/build/android/AndroidCompiledResourceMergingAction.java index 167712518a701e..a01d28444be27d 100644 --- a/src/tools/android/java/com/google/devtools/build/android/AndroidCompiledResourceMergingAction.java +++ b/src/tools/android/java/com/google/devtools/build/android/AndroidCompiledResourceMergingAction.java @@ -259,12 +259,12 @@ public static void main(String[] args) throws Exception { Files.copy(processedManifest, options.manifestOutput); } catch (MergeConflictException e) { logger.log(Level.SEVERE, e.getMessage()); - System.exit(1); + throw e; } catch (MergingException e) { logger.log(Level.SEVERE, "Error during merging resources", e); throw e; } catch (AndroidManifestProcessor.ManifestProcessingException e) { - System.exit(1); + throw e; } catch (Exception e) { logger.log(Level.SEVERE, "Unexpected", e); throw e;