File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -1076,8 +1076,22 @@ void output_flex_t::stop()
10761076
10771077void output_flex_t::wait ()
10781078{
1079+ std::exception_ptr eptr;
1080+ flex_table_t const *table_with_error = nullptr ;
1081+
10791082 for (auto &table : m_table_connections) {
1080- table.task_wait ();
1083+ try {
1084+ table.task_wait ();
1085+ } catch (...) {
1086+ eptr = std::current_exception ();
1087+ table_with_error = &table.table ();
1088+ }
1089+ }
1090+
1091+ if (eptr) {
1092+ log_error (" Error while doing postprocessing on table '{}':" ,
1093+ table_with_error->name ());
1094+ std::rethrow_exception (eptr);
10811095 }
10821096}
10831097
Original file line number Diff line number Diff line change @@ -159,8 +159,16 @@ void output_pgsql_t::stop()
159159
160160void output_pgsql_t::wait ()
161161{
162+ std::exception_ptr eptr;
162163 for (auto &t : m_tables) {
163- t->task_wait ();
164+ try {
165+ t->task_wait ();
166+ } catch (...) {
167+ eptr = std::current_exception ();
168+ }
169+ }
170+ if (eptr) {
171+ std::rethrow_exception (eptr);
164172 }
165173}
166174
You can’t perform that action at this time.
0 commit comments