projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8d053b
)
Fix #775 by catching and handling the thrown exception
author
Soeren Apel
<soeren@apelpie.net>
Tue, 6 Jun 2017 17:46:00 +0000
(19:46 +0200)
committer
Soeren Apel
<soeren@apelpie.net>
Tue, 6 Jun 2017 17:46:00 +0000
(19:46 +0200)
pv/session.cpp
patch
|
blob
|
history
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);
- 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