|
14 | 14 | // Copyright 2017 The Bazel Authors. All rights reserved.
|
15 | 15 | package com.google.devtools.build.android;
|
16 | 16 |
|
| 17 | +import static java.util.logging.Level.SEVERE; |
| 18 | + |
17 | 19 | import com.google.common.base.Preconditions;
|
18 | 20 | import com.google.devtools.build.android.aapt2.Aapt2ConfigOptions;
|
19 | 21 | import com.google.devtools.build.android.aapt2.CompiledResources;
|
|
29 | 31 | import java.nio.file.Path;
|
30 | 32 | import java.util.List;
|
31 | 33 | import java.util.Optional;
|
| 34 | +import java.util.logging.Logger; |
32 | 35 | import java.util.stream.Collectors;
|
33 | 36 |
|
34 | 37 | /** Performs resource validation and static linking for compiled android resources. */
|
@@ -145,6 +148,9 @@ public static class Options extends OptionsBase {
|
145 | 148 | public Path sourceJarOut;
|
146 | 149 | }
|
147 | 150 |
|
| 151 | + private static final Logger logger = |
| 152 | + Logger.getLogger(ValidateAndLinkResourcesAction.class.getName()); |
| 153 | + |
148 | 154 | public static void main(String[] args) throws Exception {
|
149 | 155 | final OptionsParser optionsParser =
|
150 | 156 | OptionsParser.newOptionsParser(Options.class, Aapt2ConfigOptions.class);
|
@@ -190,6 +196,9 @@ public static void main(String[] args) throws Exception {
|
190 | 196 | .copySourceJarTo(options.sourceJarOut)
|
191 | 197 | .copyRTxtTo(options.rTxtOut);
|
192 | 198 | profiler.recordEndOf("link");
|
| 199 | + } catch (Exception e) { |
| 200 | + logger.log(SEVERE, "Error while validating and linking resources", e); |
| 201 | + throw e; |
193 | 202 | }
|
194 | 203 | }
|
195 | 204 | }
|
0 commit comments