Skip to content

Instantly share code, notes, and snippets.

@carrotIndustries
Created December 5, 2017 21:48
Show Gist options
  • Save carrotIndustries/2c2cfae3d066e992433b8e536d97b50e to your computer and use it in GitHub Desktop.
Save carrotIndustries/2c2cfae3d066e992433b8e536d97b50e to your computer and use it in GitHub Desktop.
diff --git schematic/sheet.cpp schematic/sheet.cpp
index 94b7c1a..f816d2d 100644
--- schematic/sheet.cpp
+++ schematic/sheet.cpp
@@ -67,7 +67,12 @@ namespace horizon {
const json &o = j["net_lines"];
for (auto it = o.cbegin(); it != o.cend(); ++it) {
auto u = UUID(it.key());
- net_lines.emplace(std::make_pair(u, LineNet(u, it.value(), this)));
+ try {
+ net_lines.emplace(std::make_pair(u, LineNet(u, it.value(), this)));
+ }
+ catch (...){
+ std::cout << "error loading net line " << (std::string) u << std::endl;
+ }
}
}
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment