AAPT2: better error handling for daemon mode
Test: manual
Change-Id: Ia1997800ad94f386dbbb4195011395ecee1ba91f
diff --git a/tools/aapt2/Main.cpp b/tools/aapt2/Main.cpp
index e4ca7a4..82977cb 100644
--- a/tools/aapt2/Main.cpp
+++ b/tools/aapt2/Main.cpp
@@ -101,10 +101,12 @@
std::vector<StringPiece> args;
args.insert(args.end(), token_iter, tokenizer.end());
- ExecuteCommand(command, args, diagnostics);
- std::cout << "Done" << std::endl;
+ int ret = ExecuteCommand(command, args, diagnostics);
+ if (ret != 0) {
+ std::cerr << "Error" << std::endl;
+ }
+ std::cerr << "Done" << std::endl;
}
-
std::cout << "Exiting daemon" << std::endl;
}