File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,17 +67,36 @@ struct NODISCARD RemeshCookie final
6767 && future.wait_for (std::chrono::nanoseconds (0 )) != std::future_status::timeout;
6868 }
6969
70+ private:
71+ static void reportException ()
72+ {
73+ try {
74+ std::rethrow_exception (std::current_exception ());
75+ } catch (const std::exception &ex) {
76+ qWarning () << " Exception: " << ex.what ();
77+ } catch (...) {
78+ qWarning () << " Unknown exception" ;
79+ }
80+ }
81+
7082public:
7183 // Don't call this unless isPending() is true.
7284 // NOTE: This can throw an exception thrown by the async function!
7385 NODISCARD SharedMapBatchFinisher get ()
7486 {
7587 DECL_TIMER (t, __FUNCTION__);
7688 FutureSharedMapBatchFinisher &future = m_opt_future.value ();
77- auto pFinisher = future.get ();
89+
90+ SharedMapBatchFinisher pFinisher;
91+ try {
92+ pFinisher = future.get ();
93+ } catch (...) {
94+ reportException ();
95+ pFinisher.reset ();
96+ }
7897
7998 if (m_ignored) {
80- pFinisher = SharedMapBatchFinisher{ nullptr } ;
99+ pFinisher. reset () ;
81100 }
82101
83102 reset ();
You can’t perform that action at this time.
0 commit comments