Skip to content
Snippets Groups Projects
Commit 9a626b54 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

give useful error message on exception

parent f84075fb
No related branches found
No related tags found
No related merge requests found
......@@ -269,9 +269,14 @@ void Streamer::_schedule() {
auto start = std::chrono::high_resolution_clock::now();
try {
src->src->grab();
} catch (...) {
} catch (std::exception &ex) {
LOG(ERROR) << "Exception when grabbing frame";
LOG(ERROR) << ex.what();
}
catch (...) {
LOG(ERROR) << "Unknown exception when grabbing frame";
}
std::chrono::duration<double> elapsed =
std::chrono::high_resolution_clock::now() - start;
LOG(INFO) << "Grab in " << elapsed.count() << "s";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment