- boost::archive::text_iarchive ia(ss);
- ia >> boost::serialization::make_nvp("offset", offset);
-
- // This also updates ruler_offset_
- set_offset(offset);
+ try {
+ boost::archive::text_iarchive ia(ss);
+ ia >> boost::serialization::make_nvp("offset", offset);
+ // This also updates ruler_offset_
+ set_offset(offset);
+ } catch (boost::archive::archive_exception) {
+ qDebug() << "Could not restore the view offset";
+ }