Use AIDL_* errors over libbase logging.

This:
- gives us line numbers in source AIDL files reflecting errors
- makes it possible aidl_parser_fuzzer can detect when we return an
  error but don't provide any output logging

Bug: N/A
Test: aidl_unittest
Change-Id: I0479fd8d87547c1f0b1be754f9b8f6865db3cbef
diff --git a/aidl_checkapi.cpp b/aidl_checkapi.cpp
index a0107e4..0f2f4b0 100644
--- a/aidl_checkapi.cpp
+++ b/aidl_checkapi.cpp
@@ -127,7 +127,7 @@
     const auto& old_args = old_m->GetArguments();
     const auto& new_args = new_m->GetArguments();
     // this is guaranteed because arguments are part of AidlMethod::Signature()
-    CHECK(old_args.size() == new_args.size());
+    AIDL_FATAL_IF(old_args.size() != new_args.size(), old_m);
     for (size_t i = 0; i < old_args.size(); i++) {
       const AidlArgument& old_a = *(old_args.at(i));
       const AidlArgument& new_a = *(new_args.at(i));
@@ -317,9 +317,10 @@
 }
 
 bool check_api(const Options& options, const IoDelegate& io_delegate) {
-  CHECK(options.IsStructured());
-  CHECK(options.InputFiles().size() == 2) << "--checkapi requires two inputs "
-                                          << "but got " << options.InputFiles().size();
+  AIDL_FATAL_IF(!options.IsStructured(), AIDL_LOCATION_HERE);
+  AIDL_FATAL_IF(options.InputFiles().size() != 2, AIDL_LOCATION_HERE)
+      << "--checkapi requires two inputs "
+      << "but got " << options.InputFiles().size();
   auto old_tns = load_from_dir(options, io_delegate, options.InputFiles().at(0));
   if (!old_tns.ok()) {
     return false;