[debugger] Avoid exceptions in filesystem API.

Changes the filesystem API call to use the variant that doesn't throw
exceptions on filesystem errors. Since we don't compile with exceptions,
any errors reading the file information will crash the program if we use
the version that throws.

TEST=none

Change-Id: I43e6266fa31ecf0ae43d16ca3854835b235a9fc5
diff --git a/bin/zxdb/symbols/build_id_index.cc b/bin/zxdb/symbols/build_id_index.cc
index 2aecc68..6d9585a 100644
--- a/bin/zxdb/symbols/build_id_index.cc
+++ b/bin/zxdb/symbols/build_id_index.cc
@@ -139,7 +139,8 @@
 }
 
 void BuildIDIndex::IndexOneSourcePath(const std::string& path) {
-  if (std::filesystem::is_directory(path)) {
+  std::error_code ec;
+  if (std::filesystem::is_directory(path, ec)) {
     // Iterate through all files in this directory, but don't recurse.
     int indexed = 0;
     for (const auto& child : std::filesystem::directory_iterator(path)) {
@@ -147,7 +148,7 @@
         indexed++;
     }
     status_.emplace_back(path, indexed);
-  } else {
+  } else if (!ec) {
     if (IndexOneSourceFile(path)) {
       status_.emplace_back(path, 1);
     } else {