Skip to content

Commit

Permalink
Fix find_package test code
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrugman committed Apr 9, 2024
1 parent e5d8341 commit 110eeba
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/cmake/find_package/find_package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ int main(int argc, char **argv)
if (argc != 2)
{
std::cout << "Usage: " << argv[0] << " <filename>" << std::endl;
return 2;
}
auto file = std::string(argv[1]);

Expand All @@ -17,11 +18,20 @@ int main(int argc, char **argv)
{
for (const auto& fd : thread.get_fds())
{
if (fd.second.get_target() == file)
try
{
if (fd.second.get_target() == file)
{
std::cout << "tid[" << thread.id()
<< "] fd[" << fd.second.num()
<< "]" << std::endl;
}
}
catch (const std::exception& ex)
{
std::cout << "tid[" << thread.id()
<< "] fd[" << fd.second.num()
<< "]" << std::endl;
<< "] resolution failed" << std::endl;
}
}
}
Expand Down

0 comments on commit 110eeba

Please sign in to comment.