X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fstoresession.cpp;h=182642ee9aba08757269c43e208cf3b7147d5ef5;hp=f024a36cb8a8c49792eb5d8bd14d424429f42d2c;hb=f9319755734823208210b1e244b827ecb6820346;hpb=dd86facc33e7b52d48e3671b4a98167a106b455d diff --git a/pv/storesession.cpp b/pv/storesession.cpp index f024a36c..182642ee 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -45,7 +45,6 @@ using std::mutex; using std::pair; using std::shared_ptr; using std::string; -using std::unordered_set; using std::vector; using Glib::VariantBase; @@ -93,7 +92,7 @@ const QString& StoreSession::error() const bool StoreSession::start() { - const unordered_set< shared_ptr > sigs(session_.signalbases()); + const vector< shared_ptr > sigs(session_.signalbases()); shared_ptr any_segment; shared_ptr lsegment; @@ -302,10 +301,14 @@ void StoreSession::store_proc(vector< shared_ptr > achannel_li units_stored_ = unit_count_ - (sample_count_ >> progress_scale); } - auto dfend = context->create_end_packet(); - const string ldata_str = output_->receive(dfend); - if (output_stream_.is_open()) - output_stream_ << ldata_str; + try { + auto dfend = context->create_end_packet(); + const string ldata_str = output_->receive(dfend); + if (output_stream_.is_open()) + output_stream_ << ldata_str; + } catch (Error& error) { + error_ = tr("Error while saving: ") + error.what(); + } // Zeroing the progress variables indicates completion units_stored_ = unit_count_ = 0;