We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b993e41 commit 150abb6Copy full SHA for 150abb6
mp2p_icp_map/src/metricmap.cpp
@@ -644,11 +644,18 @@ bool metric_map_t::save_to_file(
644
{
645
return false;
646
}
647
+ try
648
+ {
649
+ auto arch = mrpt::serialization::archiveFrom(f);
650
+ arch << *this;
651
- auto arch = mrpt::serialization::archiveFrom(f);
- arch << *this;
-
- return true;
652
+ return true;
653
+ }
654
+ catch (const std::exception& e)
655
656
+ std::cerr << "[metric_map_t::save_to_file] Error: " << e.what();
657
+ return false;
658
659
660
661
bool metric_map_t::load_from_file(
0 commit comments