Introduce unique error codes

This commit is contained in:
Thomas Krijnen
2026-06-10 09:14:22 +02:00
parent 251157f8d4
commit a751fb956d
86 changed files with 495 additions and 484 deletions
+7 -7
View File
@@ -29,7 +29,7 @@ namespace {
if (density > 1e5) {
items[0].Shape()->set_box(box);
items.erase(items.begin() + 1, items.end());
Logger::Notice("Substituted element with " + boost::lexical_cast<std::string>(density) + " vertices / m3 with a bounding box");
Logger::Notice("GEO", 30, "Substituted element with " + boost::lexical_cast<std::string>(density) + " vertices / m3 with a bounding box");
}
}
}
@@ -138,7 +138,7 @@ IfcGeom::BRepElement* ifcopenshell::geometry::Converter::create_brep_for_represe
}
}
if (some_items_without_style) {
Logger::Warning("No material and surface styles for:", product);
Logger::Warning("GEO", 31, "No material and surface styles for:", product);
}
}
@@ -162,7 +162,7 @@ IfcGeom::BRepElement* ifcopenshell::geometry::Converter::create_brep_for_represe
parent_id = parent_object->id();
}
} catch (const std::exception& e) {
Logger::Error(e);
Logger::Error("GEO", 32, e);
}
const std::string name = product->get_value<std::string>("Name", "");
@@ -208,10 +208,10 @@ IfcGeom::BRepElement* ifcopenshell::geometry::Converter::create_brep_for_represe
kernel_->convert_openings(product, opening_items, shapes, *place, opened_shapes);
}
} catch (const std::exception& e) {
Logger::Message(Logger::LOG_ERROR, std::string("Error processing openings for: ") + e.what() + ":", product);
Logger::Message(Logger::LOG_ERROR, "GEO", 33, std::string("Error processing openings for: ") + e.what() + ":", product);
caught_error = true;
} catch (...) {
Logger::Message(Logger::LOG_ERROR, "Error processing openings for:", product);
Logger::Message(Logger::LOG_ERROR, "GEO", 34, "Error processing openings for:", product);
}
if (!(caught_error && opened_shapes.size() < shapes.size())) {
@@ -239,7 +239,7 @@ IfcGeom::BRepElement* ifcopenshell::geometry::Converter::create_brep_for_represe
std::swap(shapes, unified_shapes);
}
} catch (std::exception& e) {
Logger::Error(e);
Logger::Error("GEO", 35, e);
}
}
@@ -357,7 +357,7 @@ IfcGeom::BRepElement* ifcopenshell::geometry::Converter::create_brep_for_process
parent_id = parent_object->id();
}
} catch (const std::exception& e) {
Logger::Error(e);
Logger::Error("GEO", 36, e);
}
const std::string guid = product->get_value<std::string>("GlobalId");