// Run the application
ret = a.exec();
- } catch (exception e) {
+ } catch (exception& e) {
qDebug() << e.what();
}
string name_str;
try {
name_str = key->description();
- } catch (Error e) {
+ } catch (Error& e) {
name_str = key->name();
}
try {
const shared_ptr<LogicSegment> segment = logic_data->logic_segments().at(segment_id);
count = min(count, (int64_t)segment->get_sample_count());
- } catch (out_of_range) {
+ } catch (out_of_range&) {
return 0;
}
}
try {
const DecodeSegment *segment = &(segments_.at(segment_id));
result = segment->samples_decoded;
- } catch (out_of_range) {
+ } catch (out_of_range&) {
// Do nothing
}
if (iter != rows->end())
(*iter).second.get_annotation_subset(dest,
start_sample, end_sample);
- } catch (out_of_range) {
+ } catch (out_of_range&) {
// Do nothing
}
}
try {
const shared_ptr<LogicSegment> segment = logic_data->logic_segments().at(segment_id);
samplerate = segment->samplerate();
- } catch (out_of_range) {
+ } catch (out_of_range&) {
// Do nothing
}
break;
shared_ptr<LogicSegment> segment;
try {
segment = logic_data->logic_segments().at(segment_id);
- } catch (out_of_range) {
+ } catch (out_of_range&) {
qDebug() << "Muxer error for" << name() << ":" << ch.assigned_signal->name() \
<< "has no logic segment" << segment_id;
return;
shared_ptr<LogicSegment> output_segment;
try {
output_segment = logic_mux_data_->logic_segments().at(segment_id);
- } catch (out_of_range) {
+ } catch (out_of_range&) {
qDebug() << "Muxer error for" << name() << ": no logic mux segment" \
<< segment_id << "in mux_logic_samples(), mux segments size is" \
<< logic_mux_data_->logic_segments().size();
try {
input_segment = logic_mux_data_->logic_segments().at(current_segment_id_);
- } catch (out_of_range) {
+ } catch (out_of_range&) {
qDebug() << "Decode error for" << name() << ": no logic mux segment" \
<< current_segment_id_ << "in decode_proc(), mux segments size is" \
<< logic_mux_data_->logic_segments().size();
auto segments = data->analog_segments();
try {
result = segments.at(segment_id)->is_complete();
- } catch (out_of_range) {
+ } catch (out_of_range&) {
// Do nothing
}
}
auto segments = data->logic_segments();
try {
result = segments.at(segment_id)->is_complete();
- } catch (out_of_range) {
+ } catch (out_of_range&) {
// Do nothing
}
}
try {
asegment = analog_data->analog_segments().at(segment_id).get();
- } catch (out_of_range) {
+ } catch (out_of_range&) {
qDebug() << "Conversion error for" << name() << ": no analog segment" \
<< segment_id << ", segments size is" << analog_data->analog_segments().size();
return;
try {
device_ = input_->device();
- } catch (sigrok::Error) {
+ } catch (sigrok::Error&) {
return;
}
try {
QLabel* label = group_label_map_.at(group);
label->setText(QString("<h3>%1</h3>").arg(group->name().c_str()));
- } catch (out_of_range) {
+ } catch (out_of_range&) {
// Do nothing
}
}
new devices::SessionFile(
device_manager_.context(),
file_name.toStdString())));
- } catch (Error e) {
+ } catch (Error& e) {
main_bar_->session_error(tr("Failed to load ") + file_name, e.what());
set_default_device();
main_bar_->update_device_list();
// Add the decode signal to all views
for (shared_ptr<views::ViewBase> view : views_)
view->add_decode_signal(signal);
- } catch (runtime_error e) {
+ } catch (runtime_error& e) {
remove_decode_signal(signal);
return nullptr;
}
try {
device_->start();
- } catch (Error e) {
+ } catch (Error& e) {
error_handler(e.what());
return;
}
try {
device_->run();
- } catch (Error e) {
+ } catch (Error& e) {
error_handler(e.what());
set_capture_state(Stopped);
return;
case SR_DF_LOGIC:
try {
feed_in_logic(dynamic_pointer_cast<Logic>(packet->payload()));
- } catch (bad_alloc) {
+ } catch (bad_alloc&) {
out_of_memory_ = true;
device_->stop();
}
case SR_DF_ANALOG:
try {
feed_in_analog(dynamic_pointer_cast<Analog>(packet->payload()));
- } catch (bad_alloc) {
+ } catch (bad_alloc&) {
out_of_memory_ = true;
device_->stop();
}
{{ConfigKey::SAMPLERATE, Glib::Variant<guint64>::create(
any_segment->samplerate())}});
output_->receive(meta);
- } catch (Error error) {
+ } catch (Error& error) {
error_ = tr("Error while saving: ") + error.what();
return false;
}
delete[] ldata;
}
- } catch (Error error) {
+ } catch (Error& error) {
error_ = tr("Error while saving: ") + error.what();
break;
}
if (sr_dev->config_check(ConfigKey::SAMPLERATE, Capability::LIST)) {
try {
gvar_dict = sr_dev->config_list(ConfigKey::SAMPLERATE);
- } catch (Error error) {
+ } catch (Error& error) {
qDebug() << tr("Failed to get sample rate list:") << error.what();
}
} else {
updating_sample_rate_ = true;
sample_rate_.set_value(samplerate);
updating_sample_rate_ = false;
- } catch (Error error) {
+ } catch (Error& error) {
qDebug() << tr("Failed to get value of sample rate:") << error.what();
}
}
if (gvar.gobj())
g_variant_get(gvar.gobj(), "(tt)",
&min_sample_count, &max_sample_count);
- } catch (Error error) {
+ } catch (Error& error) {
qDebug() << tr("Failed to get sample limit list:") << error.what();
}
}
sr_dev->config_set(ConfigKey::SAMPLERATE,
Glib::Variant<guint64>::create(sample_rate));
update_sample_rate_selector();
- } catch (Error error) {
+ } catch (Error& error) {
qDebug() << tr("Failed to configure samplerate:") << error.what();
return;
}
sr_dev->config_set(ConfigKey::LIMIT_SAMPLES,
Glib::Variant<guint64>::create(sample_count));
update_sample_count_selector();
- } catch (Error error) {
+ } catch (Error& error) {
qDebug() << tr("Failed to configure sample count:") << error.what();
return;
}
(segment_display_mode_ == ShowLastCompleteSegmentOnly)) {
try {
segment = segments.at(current_segment_);
- } catch (out_of_range) {
+ } catch (out_of_range&) {
qDebug() << "Current analog segment out of range for signal" << base_->name() << ":" << current_segment_;
}
}
(segment_display_mode_ == ShowLastCompleteSegmentOnly)) {
try {
segment = segments.at(current_segment_);
- } catch (out_of_range) {
+ } catch (out_of_range&) {
qDebug() << "Current logic segment out of range for signal" << base_->name() << ":" << current_segment_;
}
}
int row_title_width;
try {
row_title_width = row_title_widths_.at(row);
- } catch (out_of_range) {
+ } catch (out_of_range&) {
const int w = p.boundingRect(QRectF(), 0, row.title()).width() +
RowTitleMargin;
row_title_widths_[row] = w;
(segment_display_mode_ == ShowLastCompleteSegmentOnly)) {
try {
segment = segments.at(current_segment_);
- } catch (out_of_range) {
+ } catch (out_of_range&) {
qDebug() << "Current logic segment out of range for signal" << base_->name() << ":" << current_segment_;
}
}