Skip to content

Commit

Permalink
fix(examples/roundtrip): error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Mar 30, 2024
1 parent 33038d9 commit e5208d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/roundtrip/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ int main()
}

auto node = reg->bind<pw::node>(global.id).get();

if (!node.has_value())
{
std::cout << std::format("failed to bind {}: {}", global.id, node.error().message) << std::endl;
return;
}

auto info = node->info();

std::cout << std::format("Node ({}): ", info.id) << std::endl;
Expand All @@ -38,4 +45,4 @@ int main()
core->update();

return 0;
}
}

0 comments on commit e5208d9

Please sign in to comment.