2077:                                                } catch (...) { all_valid = false; break; }
2110:                                            } catch (...) {}
2159:                                                            } catch (...) { all_valid = false; break; }


  2070→                                        const char* name = way.tags()["name"];
  2071→                                        if (name && wnodes.size() >= 2) {
  2072→                                            bool all_valid = true;
  2073→                                            for (const auto& nr : wnodes) {
  2074→                                                try {
  2075→                                                    auto loc = index.get(nr.positive_ref());
  2076→                                                    if (!loc.valid()) { all_valid = false; break; }
  2077→                                                } catch (...) { all_valid = false; break; }
  2078→                                            }
  2079→                                            if (all_valid) {
  2080→                                                uint32_t way_id = static_cast<uint32_t>(local.ways.size());
  2081→                                                uint32_t node_offset = static_cast<uint32_t>(local.street_nodes.size());
  2082→
  2083→                                                for (const auto& nr : wnodes) {
  2084→                                                    auto loc = index.get(nr.positive_ref());

                                        const char* name = way.tags()["name"];
                                        if (name && wnodes.size() >= 2) {
                                            bool all_valid = true;
                                            for (const auto& nr : wnodes) {
                                                try {
                                                    auto loc = index.get(nr.positive_ref());
                                                    if (!loc.valid()) { all_valid = false; break; }
                                                } catch (...) { all_valid = false; break; }
                                            }
                                            if (all_valid) {
                                                uint32_t way_id = static_cast<uint32_t>(local.ways.size());
                                                uint32_t node_offset = static_cast<uint32_t>(local.street_nodes.size());

                                                for (const auto& nr : wnodes) {
                                                    auto loc = index.get(nr.positive_ref());


Edit

                                            for (const auto& nr : wnodes) {
                                                try {
                                                    auto loc = index.get(nr.positive_ref());
                                                    if (!loc.valid()) { all_valid = false; break; }
                                                } catch (...) { all_valid = false; break; }
                                            }
                                            if (all_valid) {
                                                uint32_t way_id = static_cast<uint32_t>(local.ways.size());
                                                uint32_t node_offset = static_cast<uint32_t>(local.street_nodes.size());

                                            for (const auto& nr : wnodes) {
                                                auto loc = index.get(nr.positive_ref());
                                                if (!loc.valid()) { all_valid = false; break; }
                                            }
                                            if (all_valid) {
                                                uint32_t way_id = static_cast<uint32_t>(local.ways.size());
                                                uint32_t node_offset = static_cast<uint32_t>(local.street_nodes.size());