aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/Converters.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/Converters.java b/src/tools/android/java/com/google/devtools/build/android/Converters.java
index f69aac162d..dcd83a537d 100644
--- a/src/tools/android/java/com/google/devtools/build/android/Converters.java
+++ b/src/tools/android/java/com/google/devtools/build/android/Converters.java
@@ -45,7 +45,8 @@ public final class Converters {
try {
return UnvalidatedAndroidData.valueOf(input);
} catch (IllegalArgumentException e) {
- throw new OptionsParsingException("invalid UnvalidatedAndroidData specification", e);
+ throw new OptionsParsingException(
+ String.format("invalid UnvalidatedAndroidData: %s", e.getMessage()), e);
}
}
@@ -75,7 +76,8 @@ public final class Converters {
}
return builder.build();
} catch (IllegalArgumentException e) {
- throw new OptionsParsingException("invalid DependencyAndroidData", e);
+ throw new OptionsParsingException(
+ String.format("invalid DependencyAndroidData: %s", e.getMessage()), e);
}
}
@@ -126,11 +128,13 @@ public final class Converters {
try {
Path path = FileSystems.getDefault().getPath(input);
if (mustExist && !Files.exists(path)) {
- throw new OptionsParsingException(String.format("%s is not a valid path.", input));
+ throw new OptionsParsingException(
+ String.format("%s is not a valid path: it does not exist.", input));
}
return path;
} catch (InvalidPathException e) {
- throw new OptionsParsingException(String.format("%s is not a valid path.", input), e);
+ throw new OptionsParsingException(
+ String.format("%s is not a valid path: %s.", input, e.getMessage()), e);
}
}