projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #775 by catching and handling the thrown exception
[pulseview.git]
/
pv
/
session.cpp
diff --git
a/pv/session.cpp
b/pv/session.cpp
index eec1a051b5a8838ba3f81b58c0759adbadb024a9..c18f809446a037475f4106e10576f3a89d5c1688 100644
(file)
--- a/
pv/session.cpp
+++ b/
pv/session.cpp
@@
-849,7
+849,14
@@
void Session::sample_thread_proc(function<void (const QString)> error_handler)
set_capture_state(device_->session()->trigger() ?
AwaitingTrigger : Running);
set_capture_state(device_->session()->trigger() ?
AwaitingTrigger : Running);
- device_->run();
+ try {
+ device_->run();
+ } catch (Error e) {
+ error_handler(e.what());
+ set_capture_state(Stopped);
+ return;
+ }
+
set_capture_state(Stopped);
// Confirm that SR_DF_END was received
set_capture_state(Stopped);
// Confirm that SR_DF_END was received