aboutsummaryrefslogtreecommitdiff
path: root/dx
diff options
context:
space:
mode:
authordelphinemartin <delphinemartin@google.com>2013-04-26 17:46:50 +0200
committerdelphinemartin <delphinemartin@google.com>2013-05-16 11:32:53 +0200
commit0b44e47c51b5c735283cc99b0c08cac82dba8a00 (patch)
tree8d5a7dd3a4d06b06f76506202ad7029ab7269b75 /dx
parent9275963e79d1625120db610b78c3a0812ebb2922 (diff)
Report problems as errors in dx (with exit codes)
(cherry picked from commit 593a7233e13d6eeb8ae5d894e29c6a27cbc7b7f0) Change-Id: I6421f95ceb97a596a19781e46cb4767bfb21cdbd
Diffstat (limited to 'dx')
-rw-r--r--dx/src/com/android/dx/command/dexer/Main.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/dx/src/com/android/dx/command/dexer/Main.java b/dx/src/com/android/dx/command/dexer/Main.java
index 8f1a3e887..a9d5a32ec 100644
--- a/dx/src/com/android/dx/command/dexer/Main.java
+++ b/dx/src/com/android/dx/command/dexer/Main.java
@@ -126,9 +126,6 @@ public class Main {
"transaction", "xml"
};
- /** number of warnings during processing */
- private static int warnings = 0;
-
/** number of errors during processing */
private static int errors = 0;
@@ -183,8 +180,7 @@ public class Main {
* @return 0 if success > 0 otherwise.
*/
public static int run(Arguments arguments) throws IOException {
- // Reset the error/warning count to start fresh.
- warnings = 0;
+ // Reset the error count to start fresh.
errors = 0;
// empty the list, so that tools that load dx and keep it around
// for multiple runs don't reuse older buffers.
@@ -336,7 +332,7 @@ public class Main {
}
} catch (StopProcessing ex) {
/*
- * Ignore it and just let the warning/error reporting do
+ * Ignore it and just let the error reporting do
* their things.
*/
}
@@ -350,11 +346,6 @@ public class Main {
}
}
- if (warnings != 0) {
- DxConsole.err.println(warnings + " warning" +
- ((warnings == 1) ? "" : "s"));
- }
-
if (errors != 0) {
DxConsole.err.println(errors + " error" +
((errors == 1) ? "" : "s") + "; aborting");
@@ -498,8 +489,7 @@ public class Main {
ex.printContext(DxConsole.err);
}
}
-
- warnings++;
+ errors++;
return false;
}