am f3cc38a6: am 60b98a38: am 880940ad: Doc change: add schema.org metadata.
* commit 'f3cc38a60ed4642f35b307602e2516f7bcd45ff1':
diff --git a/Android.mk b/Android.mk
index 302ae6e..7d8953f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -23,7 +23,7 @@
LOCAL_JAVA_LIBRARIES := \
jsilver \
guavalib \
- antlr
+ antlr-runtime
LOCAL_CLASSPATH := \
$(HOST_JDK_TOOLS_JAR)
diff --git a/src/com/google/doclava/apicheck/ApiCheck.java b/src/com/google/doclava/apicheck/ApiCheck.java
index 18eef2e..fb5b011 100644
--- a/src/com/google/doclava/apicheck/ApiCheck.java
+++ b/src/com/google/doclava/apicheck/ApiCheck.java
@@ -123,6 +123,7 @@
public static ApiInfo parseApi(String filename) throws ApiParseException {
InputStream stream = null;
+ Throwable textParsingError = null;
// try it as our format
try {
stream = new FileInputStream(filename);
@@ -132,9 +133,8 @@
try {
return ApiFile.parseApi(filename, stream);
} catch (ApiParseException ignored) {
+ textParsingError = ignored;
if (false) {
- System.out.println("stopping for file: " + filename);
- ignored.printStackTrace();
return null;
}
} finally {
@@ -150,11 +150,21 @@
}
try {
return XmlApiFile.parseApi(stream);
+ } catch (ApiParseException ignored) {
+ System.out.println("Couldn't parse API file \"" + filename + "\"");
+ System.out.println(" ...as text: " + textParsingError.toString());
+ System.out.println(" ...as XML: " + ignored.toString());
+ if (false) {
+ if (textParsingError != null) textParsingError.printStackTrace();
+ ignored.printStackTrace();
+ return null;
+ }
} finally {
try {
stream.close();
} catch (IOException ignored) {}
}
+ return null;
}
public ApiInfo parseApi(URL url) throws ApiParseException {