Skip to content

Commit

Permalink
Merge pull request #4545 from ev-mp/rs_enum_enh
Browse files Browse the repository at this point in the history
rs-enumerate-devices robustness enhancement
  • Loading branch information
dorodnic authored Aug 4, 2019
2 parents 18d7947 + 810285d commit 4c5df76
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tools/enumerate-devices/rs-enumerate-devices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,19 @@ int main(int argc, char** argv) try
auto opt = static_cast<rs2_option>(j);
if (sensor.supports(opt))
{
auto range = sensor.get_option_range(opt);
cout << " " << left << setw(30) << opt << " : "
<< setw(5) << range.min << "... " << setw(12) << range.max
<< setw(6) << range.step << setw(10) << range.def << "\n";
try
{
auto range = sensor.get_option_range(opt);
cout << " " << left << setw(30) << opt << " : "
<< setw(5) << range.min << "... " << setw(12) << range.max
<< setw(6) << range.step << setw(10) << range.def << "\n";
}
catch (const error & e)
{
cerr << "RealSense error calling " << e.get_failed_function() << "(" << e.get_failed_args() << "):\n " << e.what() << endl;
}
}
}

cout << endl;
}
}
Expand Down

0 comments on commit 4c5df76

Please sign in to comment.